3

I need to display the list items vertically and also in multiple columns. But have to use only single ul. How could it be possible. Please suggest me.

The output should look like

a  e  i
b  f  j
c  g
d  h

Thanks for any help

Altaf Hussain
  • 1,048
  • 2
  • 12
  • 25
  • 2
    possible duplicate of [I want to show list items as 2 or more columns (dynamic alignment)](http://stackoverflow.com/questions/8092830/i-want-to-show-list-items-as-2-or-more-columns-dynamic-alignment) – sandeep Aug 13 '12 at 09:12
  • 1
    Hi used to http://www.quirksmode.org/css/multicolumn.html this properites column count http://trentwalton.com/2010/07/19/css3-multi-column-layout-column-count/ – Rohit Azad Malik Aug 13 '12 at 09:13

1 Answers1

6

Afaik the only way to do that is to use column-count:

ul {
    column-count: 3;
}

Note that it only works in modern browsers and requires vendor prefixes (-webkit-column-count etc).

If you use float, inline or inline-block they will render in a different order.

powerbuoy
  • 12,460
  • 7
  • 48
  • 78