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 trial

CSS CSS Basics (2014) Basic Selectors Descendant Selectors

Workspace 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
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

mersadajan 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! :sparkles:

No 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
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

mersadajan refreshing the page does not clear the browser cache :smiley: 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 :sparkles:

Ah, I forgot the cache but here is the snapshot you asked for :smiley: : https://w.trhou.se/1sa42d4in5

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Ok, 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 :smiley: So if the fork does match then my bet is still on the browser cache :sparkles:

Ok, I will try forking and a cache reset and in case nothing works I will contact support.

Thank you Jennifer.