Quote:
Originally Posted by Jellby
Does KOReader support "display: grid"? If so, one could try something like this (works nicely on Firefox):
Code:
@supports (display: grid) {
.illustration {
display: grid;
grid-template: "image" minmax(0,max-content) "caption" min-content;
height: 100vh;
width: 100%;
margin: 0 auto;
}
.illustration .image {
grid-area: image;
}
.illustration .caption {
grid-area: caption;
font-size: 80%;
padding-top: 0.5em;
}
}
Code:
<div class="illustration">
<span class="image"><span><img src="image.jpg" alt=""/></span></span>
<span class="caption">Blah blah blah</span>
</div>
(I'm not sure the <span> inside <span class="image"> is needed, but I must have it for a reason.)
The idea is that it should work with multi-line captions too, and the whole image+caption should take 100%.
|
The code does not work in Sigil or KOReader. The solution was given in the post before yours.