vick
vick

Reputation: 476

multiple rows with a single UL

I have following:

<ul>
<li>copy</li>
<li>copy</li>
<li>copy</li>
<li>copy</li>
<li>copy</li>
<li>copy</li>
<li>copy</li>
<li>copy</li>
... 50 rows...
<ul>

I have a very long UL list, is there a sexy way I can split it to be 2 or 3 rows using CSS?? I cannot make multiple <ul>'s unfortunately.. :(

Thankful for any type of help.

Upvotes: 2

Views: 3401

Answers (1)

Pointy
Pointy

Reputation: 413767

If you styled the <li> elements with "float: left" and maybe a fixed width, they'd line up sort-of like a table. Is that what you mean?

Might also want to play with margin & padding, and set "list-style: none" because bullets or whatever would look weird.

edit — the CSS might look something like:

ul.whatever li {
  float: left; margin-left: 10px;
  width: 30%;
}

Depends on the contents etc. whether this would look better or worse of course.

Upvotes: 1

Related Questions