JSFiddle Link: here
div{
width:50px;
height:20px;
}
#container{
border:5px solid black;
width:400px;
height:200px;
}
#a{
background-color:red;
float: left;
}
#b{
background-color:blue;
float: left;
clear: left;
}
#c{
background-color:green;
float: right;
}
#d{
background-color:orange;
float: right;
clear: right;
}
#e{
background-color:black;
float: right;
clear: right;
}
<div id="container">
<div id="a">
</div>
<div id="b">
</div >
<div id="c">
</div>
<div id="d">
</div>
<div id="e">
</div>
</div>
Following image is the end result, Where you can see that, the elements on the right are not starting from the top position. There is a 1 brick space at the top. Why is that ? What is the logic ?