I'm recently learning web development and get confused with the concept of floating. Here is my code.
.test {
background-color: red;
height: 200px;
width: 200px;
float: left;
}
.test1 {
background-color: blue;
height: 200px;
width: 200px;
}
<div class="test">Box 1</div>
<div class="test1">Box 2</div>
The result in browser is here
I just don't know why text Box 2 is placed below the red box but with the blue box moved up and covered by the red box. To my understanding, text Box 2 should move up as well and then covered by the red box.