I am having trouble getting my columns to extend to the bottom of the body element. Here is the CSS so far:
body {
margin: 0 auto;
padding: 0;
width:90%;
background: #a7a09a;
}
.header {
padding: 5px 10px;
background-color: #DDDDDD;
}
.navmenu {
background-color: #CC9998;
}
.navmenu ul {
margin: 0;
padding: 0;
list-style-type: 0;
}
.navmenu li {
display: inline;
margin: 0;
padding: 5px 10px;
}
.column1 {
width: 70%;
height: 100%;
float: left;
background-color: #9ACC99;
}
.column2 {
width: 30%;
height: 100%;
float: right;
background-color: #9999CD;
}
.footer {
clear: left;
}
h1 {
margin: 0;
}
h2 {
padding: 5px;
}
p {
padding: 10px;
}
The first column extends past the second one. I know it has something to do with them being float elements and I read about using the clear attribute but I've tried fooling around with left, right, both, none on the Footer div and the second column still doesn't extend. What is the best way to edit my CSS to make this happen?
<body>
<div class="header">
<h1>Simple 2 column CSS layout, final layout</h1>
</div>
<div class="navmenu">
<ul>
</ul>
</div>
<div class="column1">
<h2>Column </h2>
<p> <a href="#">Text</a>
<br>
<br>
<a href="#">Simple 2 column CSS layout</a>
</p>
<ul>
</ul>
</div>
<div class="footer">
</div>
</body>