DotDot1 DotDot1 - 1 year ago 77
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.
Answer Source
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download