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

Why 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

Hi Martin,

Could you please post the code you have.

19 Answers

This 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.

Can 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?

For 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; }

Are 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

I 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.

Can you send a screenshot of your browser? That info will help me understand what is going on

I am a lost cause, I don't know how. Whatever I do it won't display.

To create a screenshot on you mac you can press "Command + Shift + 4" if you're focused on the browser.

I know, I have the screenshot saved as jpg on my desktop. But how do I put it in here?

You can use a cloud storage tool like dropbox or cloudapp

Hmm 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?

This 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!

Try adding a semicolon here: http://cl.ly/Wiid

Didn'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.

Maybe 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/

I created an account. This is it:https://github.com/Martincz26/Treehouse-css Don't know why it is so unorganized though.

Thank 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!

No problem, good luck with learning to code!