Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Olá pessoal!
Estou com problemas para deixar o rodapé sempre fixo na parte inferior do navegador. Já fui AListApart peguei uma solução deles lá que funciona certinho, menos no IE ;/
Se alguém souber um solução pra isso, fico MUITOO grato!
Segue o código para analise
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><style type="text/css">* {margin: 0;padding: 0;}body {margin: 0;padding: 0;text-align:center;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 12px;}#content {width: 780px;margin: 0 auto;text-align: left;background: #ccc;}#footer { position: absolute; /* Needed for Safari */padding: 10px;height: 12px;bottom: 0;background-color: #aa3939;width: 98%;}</style><script type="text/javascript"> <!-- function getWindowHeight() { var windowHeight = 0; if (typeof(window.innerHeight) == 'number') { windowHeight = window.innerHeight; } else { if (document.documentElement && document.documentElement.clientHeight) { windowHeight = document.documentElement.clientHeight; } else { if (document.body && document.body.clientHeight) { windowHeight = document.body.clientHeight; } } } return windowHeight; } function setFooter() { if (document.getElementById) { var windowHeight = getWindowHeight(); if (windowHeight > 0) { var contentHeight = document.getElementById('content').offsetHeight; var footerElement = document.getElementById('footer'); var footerHeight = footerElement.offsetHeight; if (windowHeight - (contentHeight + footerHeight) >= 0) { footerElement.style.position = 'relative'; footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px'; } else { footerElement.style.position = 'static'; } } } } window.onload = function() { setFooter(); } window.onresize = function() { setFooter(); } //--> </script></head><body><div id="content"><p>teste teste teste</p><p>teste teste teste</p><p>teste teste teste</p><p>teste teste teste</p><p>teste teste teste</p><p>teste teste teste</p></div><div id="footer"> tete</div></body></html>Carregando comentários...