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 trialMolly Christison
4,882 PointsLogo/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?
3 Answers
Chyno Deluxe
16,936 PointsI 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;
}
Jason Anello
Courses Plus Student 94,610 PointsHi 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
4,882 PointsIs there a better way to do that than just copying and pasting all the code into this forum?
Chyno Deluxe
16,936 PointsYou can post a WorkSpace SnapShot
Molly Christison
4,882 PointsI'm just following along with Nick for right now. I plan on making my own updates once I finish the course.
Chyno Deluxe
16,936 PointsI'll take a look at it and see what i can find. =)
Molly Christison
4,882 PointsThank you!
Kyle Hammer
2,947 PointsIn 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.
Chyno Deluxe
16,936 PointsChyno Deluxe
16,936 PointsCan you please post your HTML and CSS.
How to post Code