body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}
.uj {
background-color: aqua;
display: inline-block;
}
.qw {
height: 200px;
float: left;
}
<img src="https://picsum.photos/200/300" class="qw" alt="" height="22px">
<span>other text</span>
<div class="uj">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Similique pariatur t a quam eligendi dolores earum in officia qui maiores, doloremque repellendus dolore a chitecto, quaerat assumenda odio eaque! Saepe, et.</div>
<img src="https://placehold.co/400" alt="" height="22px">
in this when we remove inline-block from uj class, lorem ipsum appears on left side of the image while when we keep it, it appears from new line after the image. Though span text always appears on the left side of the image. Can you tell me why?