If anyone can give any insight here it would be very much appreciated. I want to create output that shows reservations in fitness classes on various dates. The idea is to have three across and however many rows are needed to cover all of the dates. To do this, I'd like to use CSS rather than resorting to tables.
Ok, so I have the following CSS definitions:
.ListSetContainer
{
background-color:Red;
border:1px solid #999999;
text-align:center;
}
.ListSet
{
margin: 2px 2px 2px 16px;
float: left;
clear:none;
}
.ListSet ul
{
background-color: #EEEEEE;
border: 1px solid #999;
margin: 2px 2px 16px 2px;
padding: 6px 6px 0px 6px;
}
And the following HTML:
<div style="clear:both;">
<h4>Class Dates, Counts and Participants</h4>
<div class='ListSetContainer'>
<div class='ListSet'>
<ul>...{Class information here...}
</ul>
</div>
<div class='ListSet'>
<ul>...{Class information here...}
</ul>
</div>
<div class='ListSet'>
<ul>...{Class information here...}
</ul>
</div>
</div> -- End of First ListSetContainer
<div class='ListSetContainer'>
<div class='ListSet'>
<ul>...{Class information here...}
</ul>
</div>
<div class='ListSet'>
<ul>...{Class information here...}
</ul>
</div>
</div> -- End of Second ListSetContainer
</div> -- End of surrounding Div
But rather than getting three divs arranged horizontally, followed by a second row with two divs, I'm getting this:
A few notes. First, notice that the hierarchy in the HTML (ListSetContainer divs contain the ListSet divs) is not reflected in the output. Second, the ListSetContainer div is only one pixel high - there is no background shown! (I'm using a Red background just to be sure I don't miss it). The whole enclosing div is just squashed down and the inner divs are floating out on their own. Setting the height manually doesn't work because the inner div with the list is variable height (and it looks odd, to boot). If I remove the float:left; from the inner divs, they expand to be the full width of the screen and thus I cannot get three in a row. So...I'm at a loss.
Again, thanks for any help you can offer!