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
http://jsfiddle.net/xR9Rd/2/
<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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…