I am struggling to create a Box Layout that expands all the way down to the bottom of the display. I have tried using height : 100%;
and min-height: 100%;
, but the boxes still do not stretch to the bottom.
Is there a solution to make these boxes expand from the top to the bottom, similar to how they expand from left to right?
* {
box-sizing: border-box;
}
body {
margin: 0;
height:100%;
min-height:100%;
position:relative;
}
.columnsmall {
float: left;
width: 22%;
padding: 10px;
height: 40px;
}
.columnmiddle {
float: right;
width: 34%;
padding: 10px;
height: 40px;
}
.columnbig {
float: left;
width: 66%;
padding:10px;
height: 80px;
}
.row:after {
content: "";
display: table;
clear: both;
}
<!DOCTYPE html>
<html>
<body>
<div class="row">
<div class="columnbig" style="background-color:#ddd;">
</div>
<div class="columnmiddle" style="background-color:#aaa;">
</div>
<div class="columnmiddle" style="background-color:#ccc;">
</div>
</div>
<div class="row">
<div class="columnsmall" style="background-color:#aaa;">
</div>
<div class="columnsmall" style="background-color:#bbb;">
</div>
<div class="columnsmall" style="background-color:#ccc;">
</div>
<div class="columnmiddle" style="background-color:#ddd;">
</div>
</div>