tags:

views:

110

answers:

4
A: 

Take a look at this article:

They explain the CSS setup for multi-column unordered lists.

The MYYN
Thanks for your reply.
Jam
+5  A: 

Hi, It is possible by floating all your li elements, and setting the width of your ul and li elements. The display order will be
1 2
3 4
5 6
if you use this method.

greg0ire
This is the perfect solution for a ul. An ol wouldn't be so fun...
danixd
Why? Because numbers length can vary I guess?
greg0ire
@greg0ire - the problem in image list items has same name but after completion name of list item can be varied. in char. lenth.
Jam
It's not "ideal" for a ul either. Even though "ul" means unordered, in many cases people expect some kind of order ( usually alphabetical or by date ). I know people should use an ol in this case, but such is life.
Atømix
A: 

Check this out to do multi-column lists: http://www.alistapart.com/articles/multicolumnlists/

For the custom bullets, specific style property you need to modify is:

list-style-image: url(someimage.gif);

Check out this link for more detailed info: http://www.alistapart.com/articles/taminglists/

find the section called "Markers".

programatique
+1  A: 

Here's the simplest CSS you can use to accomplish what greg0ire is talking about:

<ul class='myList'>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>

.myList { width : 300px; }
.myList li { float: left; width: 150px; }

Of course, as mentioned this will not create a newspaper-column-like format. IT will float left to right before popping down.

For multi-column formats, you'd have to either use a device which supports CSS3 or use javascript.

In newer versions of Firefox, CSS like this may work:

.myList{
  -moz-column-count:3;
}
Atømix
in your first solution . my `li` item's will not be fixed they can be changed. some will have less character some will more. not all item will have Business Organization always. It's just a Mock-up. so what will happen if i will give fixed width to `li`?
Jam
It really depends. If your overall layout is fixed and not fluid, then chances are you have a finite space for your columns anyhow. A fixed width will cause wrapping if it pushes past the end. You'll probably want to clear the float of every "odd-numbered" item. If you're using a fluid layout, you can use percentages or `em` units if you want the sizing to reflect the font-size. NOTE: IF YOU DON'T set a width, you won't have the appearance of columns.
Atømix