List style button and list item

I am trying to keep the list button and its item together in a display inline list.
So if the list has to fit on multiple lines, it breaks at the end of the item and not at the button item, eg.
List appears as:
*one *two *three *
four * five

but what I would like is:
*one *two *three
*four *five

Is there any way to accomplish this through css?


To get it working in IE you’ll need to add two extra lines (if you’re not using conditional-comments to call an IE stylsheet).

ul li {
display: inline-block;

  • html ul li {display: inline;} /this one’s for IE6/
    *+html ul li {display: inline;} /this one’s for IE7/

IE8 can do inline-block on block elements like li’s no problem.

IE 6 and 7 don’t need those extra lines if the element in question was already an inline element.

display: inline-block;
achieved the result.