
* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

/* Style the header */
.header {
    background-color: #c1eac1;
    padding: 50px;
    text-align: center;
}

/* Create three equal columns that floats next to each other */
.column {
    float: left;
    width: 33.33%;
    padding: 10px;
    height: 300px; /* Should be removed. Only for demonstration */
    font-size: 24px;
}

/* Clear floats after the columns */
.row:after {
    content: "";
    display: table;
    clear: both;
}

/* Style the footer */
.footer {
    background-color: #c1eac1;
    padding: 10px;
    text-align: center;
}

/* Responsive layout - makes the three columns stack on top of each other instead of next to each other */
@media (max-width: 600px) {
    .column {
        width: 100%;
    }
}
</style>
</head>
<body>

<div class="header">
  <h2>Header</h2>
  <h3>CSS Template using Float</h3>
  <p>In this example, we have created a header, three equal columns and a footer. On smaller screens, the columns will stack on top of each other. Resize the browser window to see the responsive effect.</p>
</div>

<div class="row">
  <div class="column" style="background-color:#c1c1ea;">Column</div>
  <div class="column" style="background-color:#eac1c1;">Column</div>
  <div class="column" style="background-color:#c1eac1">Column</div>
</div>

<div class="footer">
  <p>Footer</p>
</div>

</body>
</html>
