Here is an unordered list, with a red border
The list items have an orange border
See the list1.png attachment
list.png
<ul class="test2" id="list2">
<li>Mickey</li>
<li>Donald</li>
<li>Goofy</li>
<li>Robin Hood</li>
</ul>
Code CSS:#test {border: 1px solid #ff0000;} #test li {border:1px solid orange; float left; }
The list elements are floated left, and taken out of the document flow. Therefore the UL shrinks to the size of 2px in height.
Is it possible to make the <ul> contain the floated list elements but...
Without making the list elements inline,
Without specifying the height of the <ul>
The list would appear like so
list2.png <-- See the list2.png attachment










Bookmarks