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 How to Make a Website Creating HTML Content Use the Navigation Element

kate salberg
kate salberg
168 Points

Problem with tag somewhere in Navigation My Portfolio, contact and about appear horizontally and not vertical

I can't find what I've done wrong in making my navigation list horizontal and not vertical. Can you explain?

3 Answers

I think it's maybe because of the CSS. If you are using display: inline-block it usually makes the unordered list in a horizontal line instead of vertical. I might be wrong here too, but I hope someone who has better knowledge helps you :)

is your html like this? hope u don't forget any li tag.

 <nav>
        <ul>
          <li><a href="index.html" class="selected">Portfolio</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
        </ul>
      </nav>

or in your css use

nav li {
  display: block;
}
kate salberg
kate salberg
168 Points

Thanks Kidsit. I'll look into this as soon as I have time to get back to it. I appreciate your time.