CSS, Aboslute divs in a relativly positioned div
        Posted  
        
            by ace
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by ace
        
        
        
        Published on 2009-10-16T05:43:33Z
        Indexed on 
            2010/03/19
            5:01 UTC
        
        
        Read the original article
        Hit count: 450
        
Given the following code, how can I make the height of wrapper div extend all the way down.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
<style type="text/css">
.wrapperDiv {
    position: relative;
    width: 800px;
    background-color: #FFFF00;
    margin-right: auto;
    margin-left: auto;
}
.content {
    position: absolute;
    width: 95%;
    top: 55px;
    background-color: #008000;
}
.footer {
    position: absolute;
    width: 95%;
    height: 50px;
    background-color: #FF00FF;
    bottom: 5px;
}
.header {
    position: absolute;
    width: 95%;
    height: 50px;
    background-color: #CCFF33;
    top: 5px;
}
</style>
</head>
<body>
<div id="wrapper" class="wrapperDiv">
    <div id="layer2" class="footer">
    	3</div>
    <div id="layer3" class="header">
    	1</div>
    <div id="layer1" class="content">
    	2<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	<br />
    	END</div>
</div>
</body>
</html>
        © Stack Overflow or respective owner