ciao,
ho un preblemino...
ho un div "contenitore" che voglio sia alto il 100% della pagina dentro a questo div ho altri div a dimensione variabile sia con altezza in px che con altezza in %... il problema/i sono i seguenti:
- il div contenitore mi da l'altezza 100% e fin qui ok, però se dentro al contenitore inserisco un div (#tabella) e dentro a questo div metto molto testo non si ridimensiona;
- il #layer2 mi esce dal div #contenitore io vorrei che si regolasse di altezza in base al div #contenitore
allego img per capire meglio
Codice PHP:
<!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" />
<title>Documento senza titolo</title>
<style type="text/css">
<!--
html,body {
text-align: center;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
height: 100%; /* serve per mettere altezza in % quindi visualizza a tutto schermo */
}
#contenitore {
text-align: left;
width: 768px;
margin: 0 auto;
background-color: #00CC66;
position: relative;
top: 0;
height: 100% !important;
height: 100%;
min-height: 100%;
/* height: 100%; /* sistema le cose in IE */
}
#Layer1 {
position:absolute;
left:0px;
top:0px;
width:22px;
height:51px;
z-index:1;
background-color: #00FF99;
}
#Layer2 {
position:relative;
left:0px;
top:51px;
width:24px;
height:100%;
z-index:1;
background-color: #99FF00;
background-image: url(file:///C|/Documents%20and%20Settings/Laboratorio/Desktop/baby.jpg);
background-repeat: repeat;
}
#tabella {
position:absolute;
left:222px;
top:0px;
width:255px;
height:148px;
z-index:1;
}
-->
</style>
</head>
<body>
<div id="contenitore">
<div id="Layer1"></div>
<div id="Layer2"></div>
<div id="tabella">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
<tr>
<td>gfhgfhgfhfghhfgh</td>
</tr>
<tr>
<td>fghfghfghgfh</td>
</tr>
<tr>
<td>hfghfhhfdhdfg</td>
</tr>
<tr>
<td>lhlljhljh</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>ljhljhlj</td>
</tr>
<tr>
<td>ljhljhl</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td>ljhljhl</td>
</tr>
<tr>
<td>ljhljhljh</td>
</tr>
<tr>
<td>
gfhgf</p>
hgfhdgf</p>
hgfhgfh</p>
gfhfgh</p>
fghfgh</p></td>
</tr>
<tr>
<td>,bhbjh</td>
</tr>
<tr>
<td>khjbkhbkj</td>
</tr>
<tr>
<td>hbkjhbkjhbkjhb</td>
</tr>
<tr>
<td>
jhhkhbkhbjhbjhbjhbjhb</p>
hfghfg</p>
hfghfg</p>
hgfhgfh</p>
gfh</p>
gfh</p>
fgh</p>
fg</p>
hfg</p>
h</p></td>
</tr>
</table>
</div>
</div>
</body>
</html>