Hello all. I've been playing with CSS to try and make my unsorted lists show in a multi column view opposed to a vertical list. After playing around for a while I figured a way to do it. I just have two issues hopefully someone can help with.
First I created a new stylesheet with the following:
#multi ul {
width: 700px;
list-style-type:none;
}
#multi li{
width:180px;
margin:15px 0 0 0;
padding:0 10px 0 0;
line-height:15px;
float:left;
}
Within my page I just wrapped my unsorted list the following way.
<div id="multi>
<ul>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
</ul>
</div>
<p></p>
The list displays correctly, meaning the list is broken into columns side by side, but unless I put that <p></p> at the after the </div> elements below the div, like a horizontal line, floats up in the middle of the page. If I put the <p></p> then everything lines up correctly.
However. The other problem I have is, when I put the <p></p> after the div, and everything lines up correctly, it shows up fine in Firefox. In IE however, there is a huge space between the unsorted list and the content above (which is just text).
The code you posted has an error in it - it's missing a "
Quote:
Within my page I just wrapped my unsorted list the following way.
<div id="multi>
<ul>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
<li>info</li>
</ul>
</div>
<p></p>
Thanks for the reply and advice. I added the overflow and it worked perfect in FF. However in IE, it doesnt seem to translate as well. It places the list at the bottom of the page so there is a large gap between my page heading and the list. FF, looks great though. Any ideas?
Oh and the missing quotation after multi was a typo. =)
The code I posted works correctly in FF3, IE7 and IE6.
If it's actiing weird when you try to incorporate it into your site we'll have to see your code.
A link would be best but if you quote your code here, please use code tags.