To avoid that images exceed the page boundaries I use the following CSS:
That works fine, big images are scaled properly!
However, if I add CSS to generate a image caption:
... there is no scaling at all - neither property 'width' nor property 'max-width' have any effect on the rendered image!
img {
display:block;
margin-left:auto; margin-right:auto;
max-width: 170mm;
max-height: 250mm;
counter-increment: figures;
}
That works fine, big images are scaled properly!
However, if I add CSS to generate a image caption:
img::after {
display:block;
text-align:center;
content: 'Figure ' counter(figures) ' - ' attr('alt');
}
... there is no scaling at all - neither property 'width' nor property 'max-width' have any effect on the rendered image!
- - -
Johann