Fixed Bottom Align Div

I need a footer at the bottom of the page that overlaps any content that would make the page scroll. Also, when scrolling down, the footer should still stay there.

Is it possible that css only works for IE6 +?

+1


a source to share


4 answers


I recently used the following style:



div.BottomDisclaimer
{
  z-index:100;
  position:fixed;
  bottom:0px;
  border-top-style: solid;
  border-top-width: 1pt;
  padding-top: 4px;
}

      

+6


a source


Do a quick Google search for CSS footer and you will find many solutions. But most of the solutions seem to work like this:

<body>
  <div id="wrapper">
     Main content
  </div>
  <div id="footer">
     Footer content
  </div>
</body>

      



and then applying css:

body, html { height: 100% }
#wrapper { height: 100% }
#footer {
  height: 150px;
  margin-top: -150px;
}

      

+1


a source


EDIT: Because IE6 doesn't support the: fixed; position, here's a good workaround .

0


a source


Cannot be used for IE6 position:fixed

. You can use Dean Edwards' IE7 library to get this behavior if you like.

0


a source







All Articles