I tend to HTML and CSS. I was confused with the property float. I don’t understand why it scares me. I use these articles to understand . I got this part when we apply an element floatthat is unloaded from the normal stream and floats left and right of it based on the value float, and the content below it wraps around it and tries to wrap it. The part where I got confused, I will explain with an example. I have three divs A, B, C. As I said in the fragment:
body {
background: #eaeaed;
}
div{
border : 2px solid #ff00ff;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
}
.divA{
background: yellow;
}
.divB{
background: green;
}
.divC{
background: blue;
}
<div class="divA">
<span>Div A</span>
</div>
<div class="divB">
<span>Div B</span>
</div>
<div class="divC">
<span>Div C</span>
</div>
Run codeHide result, float:left divA. , divB . , divB. B C /. , A , , , , divB , B- , . .
body {
background: #eaeaed;
}
div{
border : 2px solid #ff00ff;
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
}
.divA{
background: yellow;
float: left;
}
.divB{
background: green;
}
.divC{
background: blue;
}
<div class="divA">
<span>Div A</span>
</div>
<div class="divB">
<span>Div B</span>
</div>
<div class="divC">
<span>Div C</span>
</div>
Hide result