Forum Moderators: not2easy
(The <div id="wrapper"> </div> tag is present in the body of the html code)
body{
font-family: Ariel;
background-color: #69C0ED;
color: #FFFFFF
padding: 0;
margin:0;
}
#wrapper{
position: fixed;
width: 750px;
height: 100%;
background-color: #FFFFFF;
left: auto;
right: auto;
top: auto;
bottom: auto;
}
Loose the position:fixed.
Next get your height:100% working properly: it sets the height of the element to the height of the parent provided the direct parent has an explicitly set height different from auto.
In general it's smart to set the min-height of the innermost element instead of setting it's height (you'll notice when you add more content than the viewport it long).
e.g.:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>untitled</title>
<style type="text/css">
* {
margin:0;
padding:0;
}
html {
background-color: #FFFFFF;
height: 100%;
}
body {
background-color: #69C0ED;
min-height: 100%;
width: 750px;
margin: 0 auto;
color: #fff;
font-family: Arial, Helvetica, sans-serif;
}
</style>
<!--[if IE 6]>
<style type="text/css">
body {
height: 100%; /* for for IE6's lack of support on min-height */
}
</style>
<![endif]-->
</head>
<body>
<p>hello world</p>
</body>
</html>
There's no need to have the wrapper as long as you keep IE6 out of quirks mode, but if you want one, it can be done there just the same (just leave the 100% height on html).