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 Responsive Web Design and Testing Adjust the Profile Page and Header

Molly Christison
Molly Christison
4,882 Points

Logo/Nav Alignment

I can't seem to get my logo and my nav in alignment on desktop screens. The logo keeps floating towards the top of the page on the left while the nav rests below it off to the right. How do I get it so that it's all sitting on one line?

Can you please post your HTML and CSS.

How to post Code

3 Answers

I found your problem. In the main.css file you're nav has a top and bottom padding of 100px. so thats what is creating the imbalance on desktop displays. Removing it will fix it but if you want it for mobile devices i'd suggest moving it to the responsive.css

nav {
    text-align: center;
    padding: 100px 0; /* <----- */
    margin: 20px 0 0;
} 

Hi Holly,

It looks like this was just a typo. I checked my local copy of this project and I have 10px where you have 100px.

Molly Christison
Molly Christison
4,882 Points

Is there a better way to do that than just copying and pasting all the code into this forum?

You can post a WorkSpace SnapShot

Molly Christison
Molly Christison
4,882 Points

https://w.trhou.se/l6avehe674

I'm just following along with Nick for right now. I plan on making my own updates once I finish the course.

I'll take a look at it and see what i can find. =)

Kyle Hammer
Kyle Hammer
2,947 Points

In your main.css, make sure your nav{ padding has 10px 0px. I had the same problem... looking back over the downloaded finished code, I found my mistake. Perhaps you missed it too.