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 Build a Responsive Website Creating a Fluid Foundation Creating Flexible Margins

Problem with the ul.nav li

I am trying to set the widths of all the elements of the SmellLikeBakin page, but I can't find the right percentage to ul.nav li margin-right

ul.nav li {
    float: left;
    margin-right: 40px;/*40px*/
}

For every number that I tried it breaks the layout, and displays all the <li> elemens one below the other.

2 Answers

try adding this in front

ul.nav { display: block; }

Yeah it makes sense in solving the problem, but I still don't understand why it behave like this. But Thank you anyway :)

Somewhere you may have set ul or .nav to display:inline-block, so I'm resetting it.