I have a question that I believe may be common and already answered, but I can't seem to find the solution.
Currently, I am working on creating a simple 2 column layout. While the columns are displaying correctly, the footer ends up in the sidebar area if the content area is taller than the sidebar area. HTML:
/* SECTIONS */
.section {
clear: both;
padding: 0px;
margin: 0px;
}
/* COLUMN SETUP */
.col {
display: block;
float:left;
margin: 1% 0 1% 1.6%;
}
.col:first-child { margin-left: 0; }
/* GROUPING */
.group:before,
.group:after {
content:"";
display:table;
}
.group:after {
clear:both;
}
.group {
zoom:1; /* For IE 6/7 */
}
/* GRID OF THREE */
.span_2_of_3 {
width: 66.1%;
}
.span_1_of_3 {
width: 32.2%;
}
/* GO FULL WIDTH AT LESS THAN 480 PIXELS */
@media only screen and (max-width: 480px) {
.col { margin: 1% 0 1% 0%;}
.span_3_of_3, .span_2_of_3, .span_1_of_3 { width: 100%; }
}
<html>
<head>
</head>
<body>
<div class="wrapper"> <div class="container">
<div class="col span_2_of_3">
<div>Sample text goes here...</div>
</div>
<div class="col span_1_of_3">
Here is widget content
</div></div></div>
<footer>
<div class="container">
This is footer content
</div>
</footer>
</body>
</html>