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 How to Make a Website Customizing Colors and Fonts Use Color in CSS

Trying to fix the colors of the headlines - Following Nick´s instructions when I use the h1, h2 { color #fff;

It supposed to style both h1 and h2 elements turning my typing white against a green background as following Nick´s explanation. I dont know what I have been missing but the typing is not becoming white when I follow the codes above. Meanwhile when I use the code for h1 separated from the h2 it does work. Thanks.

3 Answers

Jeff Lemay
Jeff Lemay
14,268 Points

No colon after color

h1, h2 { color: #fff; }

Took me awhile to see that.

Hey man, Thank you for your fast reply, but actually my current code is exactly the one you wrote - How can I printscreen the way you did above then I can show you - Thanks for your pattience!

Jeff Lemay
Jeff Lemay
14,268 Points

I was able to pass the code challenge with that snippet. Also worked in the workspace.

Try pasting in all the code from css file and I'll take a look.

a { text-decoration: none; }

wrapper {

max-width: 940px; margin: 0 auto; padding: 0 5%;

}

logo{

text-align: center; margin 0; }

a { color: #6ab47b; }

header{ background: #6ab77c;} border-color: #599a68; }

h1, h2 { color: #fff }

nav { background: #599a68; }

Jeff Lemay
Jeff Lemay
14,268 Points

You have an extra curly brace in the properties above, { background: #6ab77c;} border-color: #599a68; }. You're also missing a semi-colon in the color:#fff; line but that wouldn't be causing the issue.

header{ background: #6ab77c; border-color: #599a68; }

h1, h2 { color: #fff; }

Big thanks all the way from Brazil!