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

HTML How to Make a Website Responsive Web Design and Testing Adjust the Profile Page and Header

Nav aligns to the right but does not appear in header section, instead it interferes with the section below it. Why?

Adding this aligns it to the right as expected, although it appears below the header bar and interferes with the images or text below it. It happens like this on my portfolio, about and contact pages. I keep comparing my code to the examples but can't find any differences.

  nav {
    background: none;
    float: right;
    font-size: 1.125em;
    margin-right: 5%;
    text-align: right;
    width: 45%;
  }

https://w.trhou.se/czetbiwlle

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey Daniel. Welcome to Treehouse.

The error is actually not in your responsive.css file. The code above is fine. Your error is a simple selector error in your main.css file.

In your "Header" section under the "General" section you should be selecting the <header> tag, but you put a # before it and turned it into a class selector instead. Just change #header to header and you'll be all good to go... just make sure after the change, you save and refresh the browser window with the preview.

Keep Coding! :)

jason anders thanks alot i have this same problem for while