Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List in multiple columns

Tags:

html

css

I have one list with 10 (li) elements. Those are displayed in single column.

If I fixed height of that list then how can I display it in two or three columns?

like image 965
Pradip Avatar asked Feb 09 '26 15:02

Pradip


2 Answers

you can check this multiple column lists

like image 64
Manoj Avatar answered Feb 12 '26 16:02

Manoj


There is a CSS3 solution for that, but it's not widely implemented by browsers yet. See this example, using the CSS property column-count:

http://jsfiddle.net/hwzpy/

Currently only works in FF, Safari and Chrome though. Otherwise, you'll have to use javascript or divide the list up in two lists.

-edit- The float variant as linked in other answers is really neat, didn't know about that one.

like image 36
Stephan Muller Avatar answered Feb 12 '26 16:02

Stephan Muller