View Full Version : min-height of div determined by image?

03-11-2005, 04:14 PM
i've been reading how ie doesn't support min-height and some related things, and am looking for a workaround....

i've got a div (#contentbackground) that contains nested divs(#itembox), each of which has an image on the left and text on the right. the images are 75px tall, and the text can be whatever length. i have a background image in these 'itemboxes' as well. these two bits are spec'd as follows:

width: 400px;
height: 100%;
display: block;
position: relative;
margin-top: 40px;
margin-right: auto;
margin-left: auto;
background-image: url(assets/k.jpg);

display: block;
margin-top: 15px;
margin-bottom: 15px;
background-image: url(assets/k.jpg);

--- then, i have applied this:

.floatleft {
float: left;
padding-right: 10px;
display: inline;

to the images in the 'itemboxes' and am wondering if there's not something i can put into this bit of code that would make the 75px image determine the minimum height of its parent 'itembox'.

this stuff seems like it should be pretty basic and IE makes me want to use tables again!! argh! thanks for the help.

claire rand
03-11-2005, 05:26 PM
this had had me pulling hair out (not mine fortunatly) while the css looks ok.. try changing the '%' specification in the height to a 'px' absolute. Its not ideal but it does appear to work, ala 'height: 100px' works while 'height: 100%' appears not to. No idea why.

The idea to get things to scale correctly like a 'div' box is brilliant, or will be when it works right.

Till then try the abosulte pixel specs and see if that works. at least it will show you if thats the problem or it is elsewhere.

03-11-2005, 05:39 PM
Min-height for IE...