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.
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.
精彩评论