View Full Version : Can ul list be both?

10 Sep 2011, 03:45 PM
I'm using a ul list with the li set to display: inline to get a horizontally listing menu. Nothing new. However, I also want the occasional vertical <li> item. Here's an example of my ugly code:

<br />
<li>something else</li>
<br /><br />
<li>town, state</li>
<li>something else</li>
<br /><br />
<li>something else below</li>

Using the <br /> is a kludge that works, but I can't help but feel there's a better way to mix inline with regular lists. Any suggestions?

PS: It just occurred to me that I could use a separate "sub ul" within a regular vertical ul. Is that the best way. I come from a programming background and having everything inside ul/li seems very elegant.....