View Single Post
Old 10-16-2024, 10:46 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,361
Karma: 20212223
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
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>
Turtle91 is offline   Reply With Quote