I have two divs in the page with same width and height.
if I give float: left to the first div, the second div goes up (which is fine because the floated element is taken out of the normal document flow)
But, why the content of the div still shows in the default stack position?
JsFiddle is given below
<div class="box0">Box 0</div>
<div class="box1">Box1</div>
.box0 {
width: 100px;
height: 100px;
background-color: brown;
float: left;
}
.box1 {
width: 100px;
height: 100px;
background-color: red;
}
See Question&Answers more detail:os