Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Oliver Sewell
Oliver Sewell
14,723 Points

the background color and border color for the header refuses to change. help

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

h1, h2 { color: #fff; }

nav { background-color: #599a68; }

nav a, nav a:visited{ color:#fff; }

the nav background color has changed but the header background and border hasn't i previewed both in internet explorer and chrome but both refuse to change the background color i was just wondering if ive typed something wrong because im pretty confused haha

Thankyou

7 Answers

Jesse Hall
Jesse Hall
4,275 Points

I'm not sure what you're working on but your whole "border-color" thing could be wrong since you don't specify what type of border and how thick:

border: solid 1px #599a68;

I don't think you typed anything wrong, maybe some other style is overriding yours. Adding !important; forces it to change. Again, I'm not sure if you're working on an objective or what.

Best of luck, Jesse

Oliver Sewell
Oliver Sewell
14,723 Points

hi jesse thanks for the reply im following the css lesson http://teamtreehouse.com/library/how-to-make-a-website/customizing-colors-and-fonts/use-color-in-css

from 4:15 he just says to add

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

but its not working and ive emailed the treehouse support team but they just told me to ask in forums its real frustrating haha

Jesse Hall
Jesse Hall
4,275 Points

/******************************** COLORS *********************************/

a { color: #6ab47b; } body { background-color: #fff; color: #999; } header { background: #6ab47b; border-color: #599a68; } nav { background-color: #599a68; }

Jesse Hall
Jesse Hall
4,275 Points

So I pasted mine above. It was near the bottom of the main.css. I also had this code way above the other header style:

header { float: left; margin: 0 0 30px 0; padding: 5px 0 0 0; width: 100%; }

Oliver Sewell
Oliver Sewell
14,723 Points

hey jesse i have all that code wrote down and its still not working :/

Oliver Sewell
Oliver Sewell
14,723 Points

maybe its a bug or something T__T

Jesse Hall
Jesse Hall
4,275 Points

How weird...I pulled up my version of the website and I see a green header with border. Sorry I couldn't help further!