|
| |
|
|
craigj1303
Posts: 29 Joined: 5/16/2007 Status: offline
|
DIV's overspilling my Container DIV in Firefox - 5/16/2007 10:25:11
Hi all I am presenting thumbnails within a container DIV. The container has no height attribute in the CSS file. I am working on 3 different pages of thumbnails all with different numbers of thumbnails within. In IE the height of the container DIV increases and decreases depending on how many thumbnails are within it. However, in Firefox the thumbnails "overspill" outside of the container DIV unless I specify a height attribute in the CSS to make it high enough. Obviously I don't want to do this because every page needs to be a different height. Is there anything I can put in the CSS to make Firefox adjust the height of the container DIV depend on how many thumbs there are like IE does? This is the CSS I have: #gallerycontainer {
width: 700px;
margin: 0 auto;
background: #EFE6C5;
text-align: center;
border: solid black 1px;
}
.galleryimg {
border: solid 1px #330000;
border-width: 3px;
}
div.mainleft{
float: left;
width: 232px;
height: 180px;
margin-top: 30px;
} Also, here is a link to the gallerys. Essex, Wales, West Country and Misc all have different number of images. http://uk.geocities.com/johnson463@b...m/gallery.html
|
|
|
|
Tailslide
Posts: 6003 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: DIV's overspilling my Container DIV in Firefox - 5/16/2007 11:24:17
Because you're floating the thumbs they basically take up no space (well actually it's sort of like a single line's worth of space) so Firefox and other non-IE browsers can't expand the containing div to contain them. If your clearing element isn't working then try adding "overflow:hidden" to the div which contains the floated thumbs - that usually does the trick.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
craigj1303
Posts: 29 Joined: 5/16/2007 Status: offline
|
RE: DIV's overspilling my Container DIV in Firefox - 5/16/2007 13:10:35
Thanks a lot guys, the spacer DIV worked great. Firefox now renders the page perfectly!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|