Je souhaite avoir une page qui a une hauteur fixe (sans barres de défilement). Puis, sous l'en-tête, une div de hauteur de fluide qui a une barre de défilement (pas toute la page). De plus, la largeur doit être fluide sur toute la page.Comment puis-je obtenir ce qui suit en HTML?
Ceci est illustré ci-dessous: Image of layout involving fixed-height header followed by scrolling area http://img709.imageshack.us/img709/9242/tmphh.png
Que dois-je faire en HTML pour que cela fonctionne dans tous les navigateurs, y compris IE6?
EDIT: CODE CHANGÉ, fonctionne dans IE6, Firefix, Chrome, Cependant, IE6 montre 4 barres de défilement !!!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
HTML,BODY
{
height:100%;
}
.fullContainer
{
width:80%;
height:40%;
overflow:auto;
position:relative;
}
/*-- Can only modify these --*/
.header
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height:40px;
background-color:#eeeeee;
}
.content
{
position: absolute;
top: 40px;
left: 0;
right: 0;
bottom: 0;
overflow:auto;
}
.contentContainer
{
height:100%;
}
* html .fullContainer{ /*IE6 hack*/
padding: 40px 0 0 0;
}
* html .content{ /*IE6 hack*/
height: 100%;
width: 100%;
}
/*-- Can only modify these --*/
</style>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div>before content...</div>
<div class="fullContainer">
<div class="header">Header</div>
<!-- <div class="contentContainer"> -->
<div class="content">
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.This is scroller content.
<div style="width:1000px;background-color:#ccffcc;">long text</div>
</div>
<!-- </div> -->
</div>
<div>after content...</div>
</body>
</html>
sonne comme une question pour http://Doctype.com/ – random
de Nice diagramme! +1 – Keltex
@Salvin juste au cas où votre curieux, votre question est discutée à http://meta.stackexchange.com/questions/41972/questions-illustrated – Earlz