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

Plus d'informations
il y a 2 ans 3 mois #8995 par 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?

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 2 ans 3 mois #9000 par 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
Les utilisateur(s) suivant ont remercié: rloenen

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: ingdon
Temps de génération de la page : 0.125 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo