Search code examples
csswidthhtml-lists

Crossbrowser way to wrap <li> element around content?


I'm having some problems with the dropdown menu on the page http://grantkot.com/new. If you move your mouse over the elements which have a dropdown menu assigned, you'll see that some of the elements in the dropdown often take more than 1 line and have different widths.

What I'd like it to do is to resize all the <li> of the dropdown menu so that none of them goes to a new line and all the <li> keep the same width and steps don't appear.

How can that be done?


Solution

  • .menu li li a { white-space: pre; }