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

Kailash Seshadri
Kailash Seshadri
3,087 Points

[SOLVED] logo and navigation dont line up

my logo and my navigation dont line up in the same line as nick's does i have rechecked my code numerous times but i see no difference. what have i typed wrong?

workspace snapshot: https://w.trhou.se/3aqzyutsfv

1 Answer

Looking at the video, it seems that Nick is adding these styles to the #logo element

#logo{
    float: left;
    margin-left: 5%;
    text-align: left;
    width: 45%;
}
Kailash Seshadri
Kailash Seshadri
3,087 Points

that is the same code i added:

#logo { float: left; margin-left: 5%; text-align: left; width: 45%; }

You're right, I was looking at the wrong stylesheet. Sorry about that. Looking at what you have, your margin on your nav element is 5%

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

That is adding a 5% margin on all sides, so your element is taking up 55% (45% + 5% left margin + 5% right margin). Try setting it to margin-right: 5% and see if that helps.