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
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
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.