I actually tested that code before posting and it worked, but it may not work in all browsers. (I'm not very good at full heights). What browser are you using?
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Experiment</title>
<style type="text/css" media="all">
html, body {height: 100%;}
#content_container
{
background: url(content_bg.png) repeat-y left;
width: 940px;
height: 100%;
padding: 0;
margin: 0 auto;
}
#content1
{
width: 940px;
height: 100%;
padding-left: 26px;
}
</style>
<script type="text/javascript" src=""> </script>
</head>
<body>
<div id="content_container">
<div id="content1">
<!-- dynamic page content -->
</div>
</div>
</body>
</html>
Things will be different when you have some content on that page anyway. If you want the background image to span the full height of the window, I'd suggest putting it on the <body> element anyway. Then you can forget about all the 100% heights, which are tricky anyway.
Bookmarks