Voglio costruire un layout composto da un header, un footer e due colonne centrali.
Il codice è il seguente:
<html>
<head>
<style type="text/css">
html,body{
margin:0px;
}
.header {
width: 100%;
height: 40px;
background: #ffcc00;
font-size:20px;
}
.footer {
width: 100%;
height: 40px;
margin-left:0px;
background: #ffcc00;
font-size:20px;
}
.menu {
width: 30%;
height: 100%;
overflow: auto;
float:left;
background: #aaaaaa;
font-size:20px;
}
.list {
width: 70%;
height: 100%;
overflow: auto;
float:right;
background: #cccccc;
font-size:20px;
}
</style>
</head>
<body>
<div class="header">HEADER</div>
<div class="menu">MENU</div>
<div class="list">LIST</div>
<div class="footer">FOOTER</div>
</body>
</html>
Il problema che non riesco a risolvere è se lo visualizzo devo scrollare per far vedere il footer. Io vorrei che l'altezza dei div MENU e LIST fosse calcolata prendendo l'altezza dello screen e togliendo le altezze fisse di HEADER e FOOTER.
E' possibile farlo con i CSS?
Grazie