Forum Moderators: not2easy

Message Too Old, No Replies

Keeping images from going flowing over div

         

dreaming of nascar

1:18 am on Oct 8, 2004 (gmt 0)

10+ Year Member



Hello all,
I was wondering about something. I have a page that has images aligned on the right side. I wanted them to all line up on the right side, one right below the other. I got this to work fine using:

blah{
float: right;
clear: right;
}

My question is:
If my pictures, combined, are higher than the height of the div that they are placed in, then they overflow past the bottom of the div. I was wanting to know if there is a way to make the div grow with the images.
This is a dynamic page. There are the images on the right and text on the left. I want the div to expand to whichever takes up the most room (height). If there is text that expands past the bottom of all of the pictures, then I want the div to expand to hold all of the text inside (which it currently does), but if the images expand past the end of the text, I want the div to expand to include all of the images inside of it (which it currently does not). Any advice and help on this matter would be much appreciated. Thanks in advance!

DON

createErrorMsg

1:35 am on Oct 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if the images expand past the end of the text, I want the div to expand to include all of the images inside of it (which it currently does not)

Because your images are floated, they do not have an effect uppon the height of their container div in compliant browsers like moz, ff, and ie6/standards. To make the container div enclose the floats, apply a float value to the container, itself.

More info in this thread [webmasterworld.com].