View Single Post
Old 06-25-2020, 10:41 PM   #7
bo4568
Junior Member
bo4568 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2020
Device: none
Quote:
Originally Posted by Tex2002ans View Post

Similar situation with captions being split from the images. There's no way to reliably keep image+caption together (especially on very small devices like a cellphone + large fonts), so you just try to code them as best as you can.
Code below doesn't work? It didn't split it any single time:
Code:
figure > img
{
  page-break-after: avoid;
  text-align: center;
}
figure > figcaption
{
  page-break-before: avoid;
  break-inside: avoid;
  font-size:75%;
  text-align: center;
}

<figure>
    <img src="../images/image2.png" alt="Nulla feugiat dapibus."/>
    <figcaption> Nulla feugiat nec nunc pulvinar dapibus.</figcaption>
</figure>
bo4568 is offline   Reply With Quote