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!
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
Martin Švec
8,208 PointsWhy is everything in red?
I have a problem with css elements. Almost all of my css elements are in red yet there is no problem with the code as I run it though css validator and no errors were found. Does anyone know where could be a mistake? Any help would be much appreciated. Thank you
19 Answers

Adam Waxman
8,779 PointsThis might be the issue: http://cl.ly/WiZ5. Try adding a closing curly bracket on line 85
You are nesting tags, which works with scss but not plain css.

Adam Waxman
8,779 PointsCan you send a screenshot of this? Are the elements showing up in red in the browser or are you not even able to load the page correctly?

Martin Švec
8,208 PointsFor instance, in this code i have the following elements in red: #gallery, #gallery li, #gallery li a p
gallery {
margin: 0; padding: 0; list-style: none; }
gallery li {
float: left; width: 45%; margin: 2.5%; background-color: #f5f5f5; color: #bdc3c7; }
gallery li a p {
margin: 0; padding: 5%; font-size: 0.75em; color: #bdc3c7; }

Adam Waxman
8,779 PointsAre you using chrome? If you right click on the element and click "Inspect Element" http://cl.ly/Witw it should show you where the styles are coming from: http://cl.ly/Wijj

Martin Švec
8,208 PointsI would need to fix it in workspaces. Went into the Inspect Element and just found out that elements are displayed in red there too. Don't really know how to figure out there where the problem is.

Adam Waxman
8,779 PointsCan you send a screenshot of your browser? That info will help me understand what is going on

Martin Švec
8,208 PointsI am a lost cause, I don't know how. Whatever I do it won't display.

Adam Waxman
8,779 PointsTo create a screenshot on you mac you can press "Command + Shift + 4" if you're focused on the browser.

Martin Švec
8,208 PointsI know, I have the screenshot saved as jpg on my desktop. But how do I put it in here?

Adam Waxman
8,779 PointsYou can use a cloud storage tool like dropbox or cloudapp

Adam Waxman
8,779 PointsHmm that seems very strange. Maybe there is something wrong with the Treehouse text-editor validator? Is the syntax for all the css further up in the file correct?

Martin Švec
8,208 PointsThis is how the rest of the code looks: https://www.dropbox.com/s/c0urpaglhahakbk/Screenshot1.jpg
There must be something wrong with it or I don't know what else could it be. Either way, thank you for your effort to help me out!

Adam Waxman
8,779 PointsTry adding a semicolon here: http://cl.ly/Wiid

Martin Švec
8,208 PointsDidn't help unfortunately. There must be something wrong with the text-editor validator. It changed to red all of the sudden when I added some class to html. Nothing wrong was with the class, but when I deleted the class anyway the red remained.

Adam Waxman
8,779 PointsMaybe there is a syntax error further up. Do you have a github account? If so can you paste the whole file into a gist? https://gist.github.com/

Martin Švec
8,208 PointsI created an account. This is it:https://github.com/Martincz26/Treehouse-css Don't know why it is so unorganized though.

Martin Švec
8,208 PointsThank you very much! I have gone through it many times, but this must have escaped my eye.
You have been very helpful, thank you again!

Adam Waxman
8,779 PointsNo problem, good luck with learning to code!
Chris Shaw
26,662 PointsChris Shaw
26,662 PointsHi Martin,
Could you please post the code you have.