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
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).

Link to comment
Share on other sites

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. */
}
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.