Pina Brandi

 
  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • blue color
  • green color
Home
Problemas com o Footer usando CSS PDF Print E-mail
Thursday, 25 June 2009 00:00

Galera pra quem anda tendo problemas em alguns browsers pra fixar o footer com conteudos pequenos segue ai o codigo pra resolver os prblemas e um exemplo q funciona sempre.

CSS

* {margin:0;padding:0;} 

html, body, #wrap {height: 100%;}

body > #wrap {height: auto; min-height: 100%;}

#main {padding-bottom: 150px;} /* deve ter a mesma altura do footer */

#footer {position: relative;
margin-top: -150px;
height: 150px;
clear:both;}

/* CLEAR FIX*/
.clearfix:after {content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;}
.clearfix {display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix { height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */

 

HTML

<div id="wrap">

<div id="header">

</div>

<div id="main" class="clearfix">

</div>

</div>

<div id="footer">

</div>

 

Segue aqui o link com este codigo funcionando e de onde ele foi copiado: http://www.cssstickyfooter.com/

 

Last Updated ( Friday, 26 June 2009 03:14 )