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

Christine Makkes van der Deijl
Christine Makkes van der Deijl
1,928 Points

Changing background color in navigation

I tried to change the color of my navigation background to #599a68 but it doesn't change. Instead it's still #6ab47b.

Here's my syntax.

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: #6ab47b; border-color: #599a68; }

h1, h2 { color: #fff; }

nav { background: #599a68; }

4 Answers

Aaron Lafleur
Aaron Lafleur
10,474 Points

Could you post your HTML markup so we can have a look?

John Donnell
John Donnell
7,801 Points

you may need to change the nav color in your @media css

If there is a nav-tag in your code then it should have the #599a68-background color. If it doesn't then there is a part of CSS that is overriding (more specific selector). To test that easily you could try to change:

nav { background: #599a68; }

into

nav { background: #599a68 !important; }

If the bg-color changes then there is other CSS thats setting the bg-color. To find out what part it is you can use the console in Chrome (a very useful tool for many many things in webdevelopment).

Christine Makkes van der Deijl
Christine Makkes van der Deijl
1,928 Points

Thanks for the help! I made a silly error in the html (empty 'nav'-tag), its all fine and dandy now!