Quote:
Originally Posted by JSWolf
But what about centered or full width images?
|
Same thing - the div takes up the full width, but you just set the image width to whatever is desired inside the div:
Code:
div {float:left; width:100%; text-align:center; break-inside:avoid}
div img {width:50%; margin:0 auto}
<div>
<img alt="" src="test.jpg" />
Caption text
</div>
<p>Other text.</p>
<p>Other text.</p>