Forum Moderators: not2easy
[edited by: alt131 at 6:23 am (utc) on Dec 12, 2011]
[edit reason] Side Scroll [/edit]
What happens if your user's window is something other than 700 pixels high?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="english">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>title</title>
<style type="text/css">
html,body {
margin:0;
padding:0;
height:100%;
}
#left-container {
float:left;
width:20%;
height:100%;
overflow:auto;
background-color:#00f;
}
#right-container {
float:right;
width:70%;
height:100%;
overflow:auto;
background-color:#f00;
}
</style>
</head>
<body>
<div id="left-container"></div>
<div id="right-container"></div>
</body>
</html>
Fantastic Lucy, thank you. html {height: 100%;} did the job, although I'm not sure why html {min-height: 100%;} did not work!
The body may then take a percentage value of it's parent.
[...]
Hence the "Cascading" in C.S.S. ;)
To use a a percentage height the parent must also have a height defined. If the parent has no height defined then the percentage height of the child will collapse to height :auto (the default).