Report any technical problems you discover and discuss solutions.

Responsive Images

  • Jaoton
  • Onderwerp Auteur
  • Offline
  • Nieuw lid
  • Nieuw lid
Meer
8 jaren 1 maand geleden #5148 door Jaoton
Responsive Images werd gestart door Jaoton
I am currently creating a Xerte class for our organisation, and our usage statistics show, that we have a large variety of screen-sizes used. As a first step towards responsiveness, I was therefore trying to make the images scale in response to screen size, by setting the width argument equal to a percentage value in the html code (i.e. width="50%").

Although this works as intended if executed immediately, if I close and open the source view in the editor, or close the class and open it again, the width tag is deleted. The image is thus unresponsive again.

Is this intended? If so, is there a work-around?

Thanks in advance!

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
8 jaren 1 maand geleden #5149 door ronm
Beantwoord door ronm in topic Responsive Images
Can you share a link to an example?
Or example of the code before and after being stripped?
What page type(s) are you using and what version of Xerte?

When you add images via the wysiwyg editor (rather than for instance via the graphics and sound page) you can set percentage widths in the image properties window rather than having to do so in source view. Those images should then be responsive and the code isn't removed. But that may not be the case if you are using a very old version?

HTH
Ron

Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

  • Jaoton
  • Onderwerp Auteur
  • Offline
  • Nieuw lid
  • Nieuw lid
Meer
8 jaren 1 maand geleden - 8 jaren 1 maand geleden #5150 door Jaoton
Beantwoord door Jaoton in topic Responsive Images
Thank you for the quick reply!

I am using box-standard html for the image on a plain text page, which works fine when executed right away:
<img alt="" src=" xerte.filestorage.co.uk/USER-FILES/560-
jonathans/media/Carabiner%20Full.png" style="float:right" width="50%"/>

However, after closing & then opening the source view, the width tag gets deleted:
<img alt="" src=" xerte.filestorage.co.uk/USER-FILES/560-
jonathans/media/Carabiner%20Full.png" style="float:right" />

Similarly, when using the image properties dialogue, I receive the error message "Width must be a number" open inserting a percentage value.

Unfortunately, I am not sure which version of xerte I am using, as my UI does not feature and information on that. Is there a way to find out?

Thanks again
Jonathan
Laatst bewerkt 8 jaren 1 maand geleden door Jaoton.

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
8 jaren 1 maand geleden #5151 door ronm
Beantwoord door ronm in topic Responsive Images
Sounds like you need to upgrade! You can check the version by visiting yourinstalladress/version.txt
I can't remember exactly what version it was added but we've had the ability to add percentage widths in the editor for quite some time now and even before that reduced what was stripped out when added to source. For anyone else reading this please reply with what version you are using so others can also learn from this.
HTH
Ron

Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

  • Jaoton
  • Onderwerp Auteur
  • Offline
  • Nieuw lid
  • Nieuw lid
Meer
8 jaren 1 maand geleden #5152 door Jaoton
Beantwoord door Jaoton in topic Responsive Images
Hi Ron, and again, thank you!

I am using version 3.01.

Jonathan

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
8 jaren 1 maand geleden - 8 jaren 1 maand geleden #5153 door ronm
Beantwoord door ronm in topic Responsive Images
If you're still using 3.01 you definitely need to upgrade!
In Xerte years (a bit like dog years) that's extremely old!
We're releasing Xerte X next week which celebrates 10 years since the online version was first released. See xot.xerte.org.uk/play.php?template_id=80 and xot.xerte.org.uk/play.php?template_id=81

HTH
Ron

Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/
Laatst bewerkt 8 jaren 1 maand geleden door ronm.

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

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