1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| <!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<title>test</title>
<style type="text/css">
html, body {
overflow:auto;
width:100%; height:100%;
margin:0; padding:0;
}
* {
margin:0; padding:0;
}
/* BANDEAU FIXE */
#headerfixe {
overflow:hidden;
position:fixed;
z-index:10;
width:800px; height:150px;
top:0; /* décalage vertical : 0 */
left:50%; margin-left:-400px; /* décalage horizontal : -(800/2) */
background-color:green; /* test */
}
/* MENU FIXE */
#menufixe {
overflow:hidden;
position:fixed;
width:200px; height:100%;
z-index:10;
top:150px; /* décalage vertical : 150(header) */
left:50%; margin-left:-400px; /* décalage horizontal : -(800/2) */
background-color:red; /* test */
}
/* CONTENU scrollable */
#contenuscroll {
position:absolute;
width:600px; height:auto;
top:0; padding-top:150px; /* décalage vertical : 0 (on passe SOUS le header), et on décale le texte de 150px */
left:50%; margin-left:-200px; /* décalage horizontal : -(800/2)+200(menu) */
background-color:yellow; /* test */
}
#contenu {
padding:20px;
}
</style>
</head> |