CSS div layout
Posted: Mon Mar 13, 2006 8:37 am
Hi,
I have a very strange problem with some divs and checkboxes. Here is an exapmle:
This should look as a two column layout, but... it doesn't. I don't want to use tables for design as I don't like it.
Can you help me how to make the two column design?
I managed to hack it by setting the padding-bottom: 5px; of the group divs, but what if a browser renders the checkbox differently, this problem will come again.
Overall, that's the purpose of the wrapping divs (class="group"), but I have no idea why this happens. If you can explain me I'll be very greatful.
I have a very strange problem with some divs and checkboxes. Here is an exapmle:
Code: Select all
<div class="group">
<div style="width: 200px; float:left" class="caption">
<input type="checkbox" />
</div>
<div>
Right text
</div>
</div>
<div class="group">
<div style="width: 200px; float:left" class="caption">
Left Text under checkbox
</div>
<div>
Right Text
</div>
</div>Can you help me how to make the two column design?
I managed to hack it by setting the padding-bottom: 5px; of the group divs, but what if a browser renders the checkbox differently, this problem will come again.
Overall, that's the purpose of the wrapping divs (class="group"), but I have no idea why this happens. If you can explain me I'll be very greatful.