Jump to content

div problem in firefox..PLEASE HELP!


K-Olsen

Recommended Posts

Hi!
I got a problem with my container div in firefox:

[color=red]#container {
height: 100%;
width: 800px;
margin: 0 auto;
padding: 0;
text-align: left;
background: url(container_bg.gif) center repeat-y;
}[/color]

it works fine in IE but in firefox the content floats outside the container when the content gets too big. please help!
Link to comment
https://forums.phpfreaks.com/topic/23341-div-problem-in-firefoxplease-help/
Share on other sites

The problem is to do with the the main div (#main). As it has a float its no longer part of the same scope as the container div (#container).

WHat you'll want to do is clear the float from #main, by adding the following:
[code]<div style="clear:both;"></div>[/code]
[b]After[/b] (not before) the closing div tag for the main div (#main).

problem solved:

html, body {
        height:auto !important; /* FF and compliant browsers should automatically size the body/html */
        height:100%; /* ie will set the body/html to 100%, anything overflowing that will (incorrectly) resize it. go IE */
        min-height:100%; /* when FF/etc automatically size the body/html it should be AT LEAST the height of the entire browser window, but can expand based on content. */
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.