Skip to content Skip to sidebar Skip to footer

Wrap A List To The Right

If i had a list like the following:
  • Alex
  • James
  • Thomas
  • Is
  • Asking&l

Solution 1:

For modern browsers

ul{
    -ms-column-count: 2;
    -o-column-count: 2;
    -moz-column-count: 2;
    -khtml-column-count: 2;
    column-count: 2;
    }

Solution 2:

If you would like set width for every <li> and lost order of elements, here is demo: http://jsfiddle.net/dpXz2/

li{
    display: block;
    float: left;
    width: 75px;
}

ul{
    width: 150px;
}

Solution 3:

Afaik this is not possible with CSS2. Especially if you want to keep the order like you mentioned it.

However there is a jQuery Plugin that does exactly what you descripted.

http://www.christianyates.com/blog/mmm-geeky/multi-column-lists-jquery-alternative-method


Post a Comment for "Wrap A List To The Right"