<!DOCTYPE html>
<html>
<head>
<title>Float Test - Simple</title>
<style>
body { margin: 0; padding: 20px; }
.container {
border: 2px solid black;
padding: 10px;
width: 400px;
}
.red {
float: left;
width: 100px;
height: 100px;
background: red;
}
.blue {
float: right;
width: 100px;
height: 100px;
background: blue;
}
.yellow {
background: yellow;
height: 80px;
}
.green {
clear: both;
background: green;
height: 50px;
}
</style>
</head>
<body>
<div class="container">
<div class="red">Left</div>
<div class="blue">Right</div>
<div class="yellow">Normal</div>
<div class="green">Clear</div>
</div>
</body>
</html>