inline images in a DIV - how to stretch the border to their bottom?
Posted on 2004-08-25
I have a series of inline DIVs, inside each of which is an image (floated left or right) and text. The <img> tag is inside the <p>tag so as to be flush with the top of the first line of text. Each DIV has a CSS border. The problem is, the border (and indeed the DIV itself) only contains the text, so if the image is tall and the text short, the image 'breaks out' of the border and can even intrude onto the next DIV.
In short, the container is not containing the element contained therein. Frustrating!
Might the assembled luminaries have a fix for this?