Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialmersadajan
21,306 PointsWorkspace bug: .main-header span styles not applied to website
I discover that wenn you use
.main-header span { color: white; font-size: 26px; }
the style would not apply to the html. I don't know why I did it but I deleted the space between span and the curly brace:
.main-header span{ color: white; font-size: 26px; }
and that did it. The style gets applied. Is this a workspace bug or a "feature" of the code?
1 Answer
Jennifer Nordell
Treehouse Teachermersadajan Hi there! It sounds like what you ran into is neither a bug in workspaces nor a problem with whitespace. Remember, workspaces (in this course at least) is not much more than a text editor. That code is being interpreted by the web browser running on your computer. Now, CSS can be picky about whitespace, but this shouldn't have caused this issue which makes me think that the most likely cause of this was that your browser was loading in a cached version of the CSS from before you wrote that rule. Alternatively, you could have forgotten to save your file. But if you're sure the file was saved then my bet is on cached code in your browser.
Hope this helps!
mersadajan
21,306 Pointsmersadajan
21,306 PointsNo I sat there for at least 30 minutes trying to fix it. I reloaded the website(hard reloads included), saved the document many many times and even opened a new workspace. The error continues through new workspaces and lessons :)
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse Teachermersadajan refreshing the page does not clear the browser cache Again, this code is not being run in workspaces. It's being run in the web browser on your computer. On the upper right-hand side of the workspace, you will find a camera looking icon. Clicking that will create a snapshot of the workspace which will allow us to fork it (make a copy) and take a look around. I would be happy to take a look at it myself
mersadajan
21,306 Pointsmersadajan
21,306 PointsAh, I forgot the cache but here is the snapshot you asked for : https://w.trhou.se/1sa42d4in5
Jennifer Nordell
Treehouse TeacherJennifer Nordell
Treehouse TeacherOk, mersadajan I forked it and took a look around. In fact, you might consider forking it yourself. The rule that you mention here is not present in the CSS in the snapshot you posted. Now, if the snapshot for whatever reason doesn't match the workspace you took the snapshot from, you should definitely report this to help@teamtreehouse.com.
However, if I add the rule you posted above (with the space or without) the rule is applied So if the fork does match then my bet is still on the browser cache
mersadajan
21,306 Pointsmersadajan
21,306 PointsOk, I will try forking and a cache reset and in case nothing works I will contact support.
Thank you Jennifer.