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 trialSebastian Eguez
8,248 PointsNavigation is not working as expected
@media screen and (min-width: 480px) {
/***********************************************
PAGE: HEADER
***********************************************/
nav {
background: pink;
float: right;
font-size: 1.125em;
margin-right: 5%;
text-align: right;
width: 45%;
}
}
My navigation is stacking on top of each other versus staying side by side horizontally like Nick's.
Please help.
: )
2 Answers
Stephen Viesto
Full Stack JavaScript Techdegree Student 4,997 PointsHey Sebastian, I think you may be missing the display: inline-block; bit in your nav class.
Sebastian Eguez
8,248 Points/***********************************************
NAVIGATION
***********************************************/
nav {
text-align: left;
padding: 10px 0;
margin: 20px 0 0;
}
nav ul {
list-style: none;
margin: 0 10px;
padding:0;
}
nav li {
display: inline-block;
}
nav a {
font-weight: 700;
padding: 50px 50px;
}
Stephen Viesto
Full Stack JavaScript Techdegree Student 4,997 PointsGlad you figured it out. My answer should have directed you to actually put the display bit into your list selector instead of the nav. Sorry about that
Craig Watson
27,930 PointsHi,
I put together a working version of the courses site for new students to use as a reference for debugging if you would like to take a look :)
Live version - http://rokkitpress.github.io/Treehouse_How_To_Make_A_Website/
Raw Code To Compare - https://github.com/rokkitpress/Treehouse_How_To_Make_A_Website
Hope this helps you out Craig
Sebastian Eguez
8,248 PointsCool.
Thanks.
: )
Sebastian Eguez
8,248 PointsSebastian Eguez
8,248 PointsFIXED.
I messed around with the main css.
: )