I've got a problem where whenever a text string gets too long it with break the layout and spill over. Here's two images showing what I mean.
Layout is ok here:
http://img294.imageshack.us/i/div2.png/
Layout breaks here when text spills over:
http://img69.imageshack.us/i/div2b.png/
I basically want the green coloured DIV container to remain on the left and not under lap the red one (the colours are just for illustration). I'm guessing I need to get the red DIV to fill in the space beneath it or something. The green DIV uses float:left as I don't know of any other way to posistion it to the left.
HTML
CSS
Layout is ok here:
http://img294.imageshack.us/i/div2.png/
Layout breaks here when text spills over:
http://img69.imageshack.us/i/div2b.png/
I basically want the green coloured DIV container to remain on the left and not under lap the red one (the colours are just for illustration). I'm guessing I need to get the red DIV to fill in the space beneath it or something. The green DIV uses float:left as I don't know of any other way to posistion it to the left.
HTML
Code:
<div class=\"prod_wrapper\"><div class=\"prod_gap\"></div>
<div class=\"prod_dt\">text title:</div><div class=\"prod_d\">text</div>
<div class=\"prod_dt\">text title:</div><div class=\"prod_d\">text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text </div>
<div class=\"prod_dt\">text title:</div><div class=\"prod_dimg\"></div>
<div class=\"prod_dt\"></div><div class=\"prod_d\">text</div>
<div class=\"prod_dt\">text title:</div><div class=\"prod_d\">text</div>
<div class=\"prod_gap\"></div></div>
CSS
Code:
.prod_dt
{
font-size:14px;
font-weight:bold;
text-indent:6px;
padding-top:4px;
padding-bottom:4px;
float:left;
height:16px;
width:180px;
}
.prod_d
{
font-size:14px;
padding-top:4px;
padding-bottom:4px;
}