Floating in CSS
Let's say we now have two divs with the class parent. Each of them contains a small text, and the first div contains an image that has the float property set to left.
As you already know, in this case the picture will fit on the second block:
<div class="parent">
<img src="img.png" alt="">
text
</div>
<div class="parent">
text
</div>
.parent {
border: 1px solid red;
}
.parent img {
float: left;
}
:
Let's look at how to avoid such overlapping or wrapping in the next lessons.