ItemsFloatcreate a new one block formatting context, so before << 23> it should be cleared if you expect it to be below the previous content.
, float: left leftSide div.
clear: right div clear: both.
:
* {
margin: 0;
}
#heading {
background-color: black;
height: 150px;
}
#navigation {
background-color: green;
height: 30px;
}
#leftSide {
background-color: blue;
width: 400px;
height: 700px;
float: left;
}
#rightSide {
background-color: red;
width: 400px;
height: 700px;
float: right;
}
#footer {
background-color: black;
}
<body>
<div id="wrapper">
<div id="heading">Heading</div>
<div id="navigation">Navigation</div>
<div id="leftSide">Left Side</div>
<div id="rightSide">Right Side</div>
<div style="clear: both;"></div>
<div id="footer">Footer</div>
</div>
</body>
Hide result