General questions and topics about Xerte Toolkits that don’t fit anywhere else.

images: percentages disappear and the image gets its own pixel size back

  • rloenen
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
2 jaren 3 maanden geleden #8995 door rloenen
If I set an image to 90% x 90% and center it. Then the publication is ok. But when I continue with the project, the 90% x 90% appears to have disappeared and the image takes on the size of the original pixels and often no longer fits on the screen. The percentages are not retained in this case.
In the script I see that <figure.... does not hold the percentages

Immediately after placing image with text:

<div style="text-align:center">
<figure class="image" style="display:inline-block"><img alt="" height="90%" src=" vo-leshulp.nl/xerte/USER-FILES/2- guest2-Nottingham/media/1.01_Harreveld_plattegrond_met_naam.jpg" width="90%" />
<figcaption>With text .....
</figcaption>
</figure>
</div>


Moments later:
<div style="text-align:center">
<figure class="image" style="display:inline-block"><img alt="" src=" vo-leshulp.nl/xerte/USER-FILES/2-guest2-Nottingham/media/ 1.01_Harreveld_plantegrond_with_names.jpg" />
<figcaption>With caption ....
</figcaption>
</figure>
</div>

height="90%" and width="90%" have disappeared

How to solve the problem?

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
2 jaren 3 maanden geleden #9000 door Fay
Thanks for reporting this - it is a bug that we haven't come across before. It looks like it only affects images that have captions added, so images without captions will retain the dimensions that you enter. Until we have a fix for this you can use a workaround. Add the styles optional property to the page where you are having issues. Then paste in this CSS:

figure {
width: 90%;
}
figure img {
width: 100%;
}

You can amend the 90% width for the 'figure' but keep 'figure img' as 100%.

Hope this helps
Fay
De volgende gebruiker (s) zei dank u: rloenen

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Moderators: ingdon
Tijd voor maken pagina: 0.130 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo