DotDot1 DotDot1 - 1 month ago 5
CSS Question

How to style the UL list to a single line

I want to render this list in a single line.

  • List item1

  • List item2

Should be shown as

*List item2 *List item2

What CSS style to use?

rz. rz.
ul li{
  display: inline;

For more see the basic list options and a basic horizontal list at listamatic. (thanks to Daniel Straight below for the links).

Also, as pointed out in the comments, you probably want styling on the ul and whatever elements go inside the li's and the li's themselves to get things to look nice.