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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Kellen James](https://uploads.teamtreehouse.com/production/profile-photos/6444752/micro_My_Opportunity.jpg)
Kellen James
Front End Web Development Techdegree Student 1,934 PointsNav Header will not change color!
For some reason in my CSS markup I cannot get my Nav Header to change color. I have my header element and another element below that is a black bar with my navigation list items (Portfolio, About, Contact). I want this to be the same color as my header but no matter what I do it just remains black.
Also I can't seem to figure out the margin or padding issue with the Nav header. It seems to cut off and will not extend the full length of the page.
Can someone please help? Thank you so much.
2 Answers
![Liliana Brissos](https://uploads.teamtreehouse.com/production/profile-photos/5253132/micro_75hTiRd_.jpg)
Liliana Brissos
7,686 PointsTo extend your nav header all the way, you need to remove the margin-right: 5%;
from the nav media queries and make sure that the background color is cascading correctly for the different media queries or is consistent if it's always going to be the same colour.
Right now this is overriding all your styles:
@media screen and (min-width: 660px)
nav {
background: #000;
float: right;
font-size: 1.125em;
margin-right: 5%;
text-align: right;
width: 100%;
}
Hope that helps :)
![Kellen James](https://uploads.teamtreehouse.com/production/profile-photos/6444752/micro_My_Opportunity.jpg)
Kellen James
Front End Web Development Techdegree Student 1,934 PointsWow - That worked. Thank you so much :)
![Vance Rivera](https://secure.gravatar.com/avatar/c6828855178f1ac5aef59808349727c2?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Vance Rivera
18,322 PointsThere is a lot going on this portfolio site you are creating. I took a brief look at the project and it seems like you are going in the right direction but it's a little unorganized. First issue i have found is that you are targeting and styling the nav element at least three times over two separate css files. I know one of the css rules is confined within a media query so that is fine but I would suggest especially for a project this small is to write your css code all into one file until you get more comfortable with the organization then start breaking your code out however you want.(just a suggestion). From what I have looked at is that you need to set the width of your nav to 100%. at this point you can either expand the ul full width of the nav or you can wrap your ul with a .wrapper and center align the .wrapper to compact the navigation item to the middle of the screen. As for the background color of the nav you have a rule set in responsive.css targeting media query min-width 660px that changes the existing background color. Hope this helps. Let me know if you have any more issues.Cheers!
![Kellen James](https://uploads.teamtreehouse.com/production/profile-photos/6444752/micro_My_Opportunity.jpg)
Kellen James
Front End Web Development Techdegree Student 1,934 PointsHi Vance,
Just want to say thank you so much for your help. I am not sure how my code got so unorganized but I can now see what you were talking about. I was able to fix my NAV element and get it to change to the color i wanted. Thanks so much!
Kellen James
Front End Web Development Techdegree Student 1,934 PointsKellen James
Front End Web Development Techdegree Student 1,934 PointsHere is my code.
https://w.trhou.se/tang7jhm0a