Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
General questions and topics about Xerte Toolkits that don’t fit anywhere else.
  • Page:
  • 1

TOPIC:

images: percentages disappear and the image gets its own pixel size back 6 months 3 weeks ago #8995

  • rloenen
  • rloenen's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 96
  • Thank you received: 0
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?

Please Connexion or Create an account to join the conversation.

images: percentages disappear and the image gets its own pixel size back 6 months 2 weeks ago #9000

  • Fay
  • Fay's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 229
  • Thank you received: 92
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
The following user(s) said Thank You: rloenen

Please Connexion or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ingdon
Time to create page: 0.046 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search