Jump to content

help with footer div in IE and Firefox


Darkmatter5

Recommended Posts

The footer div needs to be pushed to the bottom of the site, it works in IE (amazingly) and in Firefox the div above the footer overlaps the footer.  How can I get the footer to push to the bottom with the dynamic size of the contents of the div above it? I've attached a screenshot of IE and Firefox renderings.

 

#wrap {
    width: 100%;
    min-height: 100%;
    position: relative;*/
}
#header {
    height: 70px;
    width: 100%;
    border-bottom: 1px solid;
    /*background-color: gray;*/
}
#status {
    line-height: 2.5em;
    height: 100px;
    width: 100%;
    border-bottom: 1px solid;
    /*background-color: red;*/
}
#navcontainer {
    line-height: 2.5em;
    height: 30px;
    width: 85%;
    border-bottom: 1px solid;
    /*background-color: fuchsia;*/
}
#navright {
    line-height: 2.5em;
    text-align: right;
    /*padding-right: 1em;*/
    height: 30px;
    width: 15%;
    float: right;
    border-bottom: 1px solid;
    /*background-color: green;*/
}
#content {
    padding: 1em;
    /*background-color: blue;*/
}
#footer {
    position: absolute;
    bottom: 0;
    min-width: 95%;
    /*width: 100%;*/
    height: 40px;
    padding-left: 1em;
    padding-top: 1em;
    /*background-color: green;*/
}

<div id="wrap">
  <div id="header">
    <table width="100%" height="100%" align="center" cellpadding="2" cellspacing="0" border="0">
      <tr><td>header</td></tr>
    </table>
  </div>
  <div id="status">status</div>
  <div id="navright"><span style="background-color: white; padding: .25em;"><?php $vein->current_user(); ?></span></div><div id="navcontainer"><?php $vein->user_rights($page); ?></div>
  <div id="content">test</div>
  <div id="footer">V.E.I.N. is copywritten &copy 2008 by V.E.I.N., Inc.  All rights reserved.</div>
</div>

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/148794-help-with-footer-div-in-ie-and-firefox/
Share on other sites

Clear your floats. Always causes a problem.

 

.........

<div id="content">test</div>

  <div class="clear"></div><!-- this line clears the floats and re-instates normal flow -->

  <div id="footer">V.E.I.N. is copywritten &copy 2008 by V.E.I.N., Inc.  All rights reserved.</div>

 

</div>

 

CSS

 

.clear {

clear:both;

}

 

There are many other recipes for clearing floats.

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.