Quote:
Originally Posted by Tex2002ans
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>