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 trialNick Hernandez
2,749 PointsMy Navigation is Floating All the way up to the right. It doesn't align with my H1, H2's @660px. Please Help.
This is what I have in. Thanks in advance everyone!
@media screen and (min-width: 660px) {
/********************************* Header *********************************/
nav { background: none; float: right; font-size: 1.125em; margin-right: 5%; text-align: right; width: 45%; }
#logo { float: left; margin-left: 5%; text-align: left; width: 45%; }
h1 { font-size: 1.5em; }
h2 { font-size: 0.825em; margin-bottom: 20px; }
header { border-bottom: 5px solid #599a68; margin-bottom: 60px; } }
3 Answers
Brian Pohuski
5,386 Pointsnav {
background: none;
float: right; /* <-- Either remove this or float:left; */
font-size: 1.125em;
margin-right: 5%;
text-align: right;
width: 45%;
}
Nick Hernandez
2,749 PointsHi guys,
So i did two things.
I deleted the float: right; and also tried using "left". It didn't work.
I deleted the float and it completely dropped the navigation to the center of the page while viewing on the desktop.
any other thoughts?
thanks again.
Nick Hernandez
2,749 PointsI figured it out! I went back to my Main CSS and I saw that I put an incorrect semicolon after margin : / Thanks so much for the help! BTW. I sorta got confused when going about using codepen or jsfiddle.
mtch
8,521 Pointsmtch
8,521 PointsRemove that float: right from your nav.