View Single Post
Old 11-04-2023, 09:22 AM   #31
HeartWare
Enthusiast
HeartWare began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2023
Location: Copenhagen, DK
Device: ReadEra Android, Samsung Galaxy Tab S7+, Android 13
Quote:
Originally Posted by Turtle91 View Post
If the Lorem ipsum text is just normal paragraph text then it should easily work with:

Code:
div.image50L {width:50%; float:left}
div.image50L img {width:100%; max-width:1000px}

<p>Some paragraph before the image.</p>
<div class="image50L"><img alt="…" src="…"/></div>
<p>Some paragraph the will flow around and to the right of the image.</p>
Try that with the colored border and the image should be the only thing with the red border.
Nope. That doesn't work. However, if I exchange the 50% and the 100% and include a text-align:left it works in Sigil and Calibre, but not on my Android tablet:

Code:
div.image50L {width=100%; border: 1px solid red}
div.image50L img {width:50%; max-width: 9000px; float:left; text-align:left; padding: 0px 8px 0px 0px}
and the .xhtml the same as above.

Also, the red marker in Sigil is above the image, and covers the entire width (no red visible below the image, so it seems like the <img> is not contained within the <div>)
HeartWare is offline   Reply With Quote