aritso Site Admin
Anmeldedatum: 30.05.2006 Beiträge: 152
|
Verfasst am: 02.07.2009, 16:48 Titel: verschatelte Div-Container mit 100% Höhe |
|
|
Ich stehe immermal wieder vor dem Problem, dass zwei verschachtelte Div-Container eine 100%ige Höhe haben müssen.
Folgende HTML/CSS Angaben lösen das Problem.
Hoffentlich!
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
html, body {margin:0; padding:0; height:100%}
#contentwrapper {
position:relative;
height:100%;
min-height:100%;
background-color:#090;
}
* html #contentwrapper {height:100%}
body>#contentwrapper {height:auto}
html>body #contentwrapper{height:auto}
#content {
position:absolute;
width:99%;
height:100%;
min-height:100%;
background-color:#f90;
}
* html #content {height:100%}
body>#content {height:auto}
html>body #content{height:auto}
</style>
</head>
<body>
<div id="contentwrapper">
<div id="content">Hallo Welt!</div>
</div>
</body>
</html>
|
|
|