I am looking to make a two-column navigation bar by using a single <ul> with six <li> items:
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Team</li>
<li>Store</li>
<li>Blog</li>
<li>Contact</li>
</ul>
</nav>
Three elements on one side, and three on the other; ordered vertically.
Right now, it’s easy to do when making two seperate <ul> elements and putting padding/margins between them: http://jsfiddle.net/Baumr/SJcjN/ — but that’s not a great solution.
Could also wrap <span> tags around each set of three <li>‘s — but is that the only CSS solution?
Looking for some elegant ideas. Thank you!
CSS:
They will order like that:
If that’s not a problem, you have a very simple solution.
EDIT:
This will order them in the correct way. not sure how IE will act, but will work in all other browsers.
or you can follow strictly the
UL-LIconcept, so your html will look like this an you can have as many column as you need:Making a correct and well formated html can make your life easier.