HTML
<div class="row">
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
<div class="column"></div>
</div>
CSS
.column {
float: left;
width: 25%;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
Responsive four column layout:
/* Responsive layout - when the screen is less than 600px wide, make the three columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
.column {
width: 100%;
}
}
Comments
Post a Comment