tags:

views:

440

answers:

3

Hi, 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?

+5  A: 
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.

rz
While this gets the job done, you will also want to include some padding to keep the elements spaced nicely
Rob Allen
correct, this just makes the list horizontal. you probably want to add quite a bit more styling to the ul, li and whatever goes in the li to make things look nice.
rz
How to get the bullets to stay? Or can we bullets by some other way.
DotDot
+1  A: 

Lots of options at Listamatic.

Here's a very basic horizontal list.

Daniel Straight
A: 

html code[

  • Item 1
  • Item 2
  • Item 3
  • ]
    

    css code[ ul.list li{ width: auto; float: left; } ]

    adel aaji