View Single Post
Old 05-03-2025, 10:11 AM   #33
robertmchicago
Enthusiast
robertmchicago began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Apr 2025
Device: none
Quote:
Originally Posted by RbnJrg View Post
Well, you are lucky Your layout is simple and since before a definition with an image you have a pagebreak, the code I wrote in my first post (that works for both, epub2 and epub3) should work fine if you are not worried about the ereader is in landscape mode. And don't worry about the <figure> tag, your epub doesn't need it.

Please confirm that this is what you are referring to. Thank you very much.

CSS:
img {
display: inline-block;
width: 99%;
}

.image-setup {
text-indent: 0;
text-align: center;
margin: 0;
}

.page-break {
page-break-before: always;
break-before: page;
text-indent: 0;
margin: 1em 0;
}

HTML:
<p>text text text</p>

<h2 class="page-break">Nice Image</h2>
<div class="image-setup">
<img src="image1.jpg" alt="beautiful image one">
</div>

<p>text text text</p>
robertmchicago is offline   Reply With Quote