Édipo me da uma ajuda então... eu postei em um outro tópico mas nao obtive ajuda, meu problema é justamente o Crescimento Automático da DIV
Eu tenho uma index com 3 iframes
- TOPO
- CONTEÚDO
- RODAPE
o site está hospedado para testes
http://www.klinshop.com.br/novoindex.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</head>
<script>
function adjustFrame(frame) {
if (document.all) {
var w = frame.document.body.scrollWidth;
var h = frame.document.body.scrollHeight;
if(frame.document.body.scrollWidth > frame.document.body.offsetWidth) {
document.all[frame.name].height = h + 0;
}
else {
document.all[frame.name].height = h;
}
}
else if (document.getElementById) {
var w = frame.document.width;
var h = frame.document.height;
if(frame.document.body.scrollWidth > frame.document.body.offsetWidth) {
document.getElementById(frame.name).height = h + 0;
}
else {
document.getElementById(frame.name).height = h;
}
}
return false;
}
</script>
</head>
<body bgcolor="#041A2F">
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="297"><iframe name="topo" src="topo.html" width="950" height="400" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe></td>
</tr>
<tr>
<td valign="top"><iframe name="conteudo" id="conteudo" marginheight="0" frameborder="0" width="950" height="100%" src="home.html" scrolling="no" onload="adjustFrame(conteudo);"></iframe></td>
</tr>
<tr>
<td height="48" valign="top"><iframe name="rodape" src="rodape.html" width="950" height="107" frameborder="0" marginheight="0" marginwidth="0" scrolling="no"></iframe></td>
</tr>
</table>
</body>
</html>
home.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</head>
<Body bgcolor="ffffff">
<div id="div_conteudo" class="div_conteudo">
</div>
</body>
</html>
O CSS que estou usando para deixar meu conteudo com ajuste automático é esse:
.div_conteudo {
padding:5px 5px 5px 5px;
width:100%;
min-height: 100%;
background:#FFF;
position: relative;
}
* .div_conteudo {
height: 100%; /* hack para IE6 que trata height como min-height */
}
No IE 8.0 eu consigo visualizar perfeitamente, mas no IE 6, IE 7 e Firefox da problema.
estou fazendo o seguinte, colocando todos o conteudo dentro de DIVs da seguinte forma:
por exemplo, se você abrir a página verá que tem os aniversariantes do mês, está dentro de uma div com esse CSS:
#niver {
top: 402px;
left: 190px;
width: 244px;
position:absolute
}
Eu percebi o seguinte, se eu mudar esse CSS para:
#niver {
margin-top: 402px;
margin-left: 190px;
width: 244px;
}
Da certo, a DIV principal se ajusta até no final da DIV aniversariantes, mas se eu continuar fazendo isso para todas as páginas eu começo a ter um conflito das DIVs, e nem tudo da certo fazendo isso.
Enfim, não estou conseguindo fazer a div ficar com redimensionamento automático.
Acho que isso é coisa simples, mas estou apanhando realmente.
Se precisar de mais informações é só pedir.
Abraços
Edição feita por: Guilherme Texa, 10/05/2010, 10:30.