DIV Height 100%

Discussion in 'CSS' started by Daniel591992, Mar 28, 2009.

  1. #1
    Hey,

    Here's the design:
    http://dodesign.us/live/apraia/

    Why is it that I can't get the sidebar to extend to fill the gap? I've tried every trick in the book.

    Here's the code:

    
    * {
    	padding:0;
    	margin:0;
    }
    
    
    html { height: 100%; }
    body { min-height: 100%; height: 100%; }
    
    body {
    	background-position: center top;
    	background-repeat: no-repeat;
    	background-image: url(img/bg.jpg);
    	padding:0px 20px;
    	margin:0px;
    	background-color: #edce9f;
    	font-family: Arial;
    	color: #5a5a5a;
    	text-decoration: none;
    	word-spacing: normal;
    	text-align: left;
    	display:  block;
    }
    
    a {
    
    	color: #6872ff;
    
    }
    
    h1, h2, h3, h4, h5, h6 {
    	color: #989898;
    	font-weight: lighter;
    }
    
    #wrapper {
    	width: 822px;
    	margin: 66px auto 100px auto;
    }
    
    #header {
    }
    
    #logo {
    	margin: 0 0 18px 0;
    }
    
    #welcome {
    	background-repeat: no-repeat;
    	background-image: url(img/welcome-bg.png);
    	max-height: 268px; 
    	min-height: 268px;
    	margin-bottom: 10px;
    	color: #FFF; 
    }
    
    #welcome .padding {
    	padding: 40px 30px;
    }
    
    #hugewelcome {
    	font-size: 56px;
    }
    
    #container {
    	border: 1px solid #a29c92;
    	width: 100%;
    	display:  block;
    }
    
    #content {
    	float: left;
     	width: 642px;
     	background-color: #eaeae8;
    	min-height: 100%;
    }
    
    #container .padding {
    	margin: 24px 38px;
    
    }
    
    p {
    	line-height: 19pt;
    	font-size: 12px;
    }
    
    #menu {
     	width: 178px;
     	float: left;
     	background-image: url(img/sidebar-bg.png);
    	background-color: #cecdca;
    	background-repeat: no-repeat;
    	border: solid 1px #cdcdca;
    	height: 100%;
    }
    
    #menu .padding {
    	margin: 18px 0px 18px 18px;
    	text-align: left;
    }
    
    #menu ul li {
    	line-height: 42px;
    	list-style: none;
    	font-size: 12px;
    }
    
    #menu ul li a {
    	padding-left: 20px;
    	color: #a3906c;
    	text-decoration: none;
    }
    
    #menu ul li .activetab {
    	background: url(img/activetab.png) no-repeat;
    	padding 180px;
    	display: block;
    }
    
    Code (markup):
    
    <!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 http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="style.css" /> 
    </head>
    
    <body>
    <div id="wrapper">
    	<div id="header">
    		<div id="logo">
    			<img src="img/logo.png" alt="A Praia" height="41" width="167" />
    		</div>
    		<div id="welcome">
    			<div class="padding">
    				<span id="hugewelcome">Welcome</span>
    			</div>
    		</div>
    	</div>
    	<div id="container">
    		<div id="menu">
    			<div class="padding">
    				<ul>
    					<li><a href="index.html" class="activetab">Home</a></li>
    					<li><a href="#">Page 2</a></li>
    					<li><a href="#">About</a></li>
    					<li><a href="#">Contact</a></li>
    				</ul>
    			</div>
    		</div>
    		<div id="content">
    			<div class="padding">
    				<h2>Title</h2>
    				<p>Lorem Ipsum is simply dummy text of the <a href="#">printing and typesetting</a> industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
    			</div>
    		</div>
    		<div style="clear:both;"></div>
    	</div>
    </div>
    </body>
    </html>
    
    Code (markup):
     
    Daniel591992, Mar 28, 2009 IP
  2. rosseric

    rosseric Peon

    Messages:
    24
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It looks fine here (that, or I misunderstood your problem). I'm on FF3 on Ubuntu (Linux). which browser are you getting your result with?
     
    rosseric, Apr 2, 2009 IP
  3. le007

    le007 Well-Known Member

    Messages:
    481
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    It looks like its working
     
    le007, Apr 2, 2009 IP