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 get the menu in the nav bar line up side by side

I am having trouble getting the elements in the nav bar to line up side by side. What am I doing wrong? I have attahced my code here- http://codepen.io/Johned22/pen/LRLGmJ

2 Answers

Hi John,
In your .nav-list a declaration, try float left or right, like this:

.nav-list a {
  display:inline-block;
  float:left;
  padding:5px;}

Hope this answers your question. Best, Kate

Thanks for that Kate, that solved my issue. I have one more question regarding the nav menu. Right now it is lined up in order with the home page then next to it is personal training page and so on. The problem is when I shrink the page down slightly the nav menu goes onto two lines which I want but rather than the last page (the contact page) dropping to the second line the home page is the first page to drop to the second page. What do I need to edit in my code so that the last element on the nav menu is the first to drop down to the second line? Thanks