CSS - How to display dropdown text in one row?

Ewonhrc

New Member
I'm building a dropdown menu and I've got an issue showed on this img:
sSna8.jpg
I want the "2.1" text to be displayed next to the "Item" text. For some reaason, every new word gets a new line.Here's the html:\[code\]<ul id='nav'> <li><a href='http://stackoverflow.com/'>Item 1</a></li> <li><a href='http://stackoverflow.com/'>Item 2</a> <ul> <li><a href='http://stackoverflow.com/'>Item 2.1</a></li> </ul> </li> <li><a href='http://stackoverflow.com/'>Item 3</a></li> <li><a href='http://stackoverflow.com/'>Item 4</a></li> <li><a href='http://stackoverflow.com/'>Item 5</a></li></ul>\[/code\]And here's the CSS:\[code\]#nav { list-style: none;}#nav li { float: left; position: relative;}#nav li a { display: block; text-decoration: none; text-align: center; background: #ccc; margin-right: 5px;}#nav li ul { position: absolute;}#nav li ul li { display: block;}#nav li ul li a { padding: 0px 10px; height: 20px; text-align: left; background: #999;}\[/code\]Thanks for any help, Mike.
 
Top