Image resize on mobile - not working

More
1 year 8 months ago #67667 by buddyhelp
It's possible that you may need to add some additional CSS to the Cassiopeia template to ensure that the images with captions resize properly on mobile devices. One solution could be to use the following CSS code:

@media (max-width: 767px) {
.captionedImage {
width: 100% !important;
height: auto !important;
}
}


This code targets images with the class "captioned Image" and sets their width to 100% and height to auto when the screen width is less than or equal to 767 pixels (typical mobile device width). You can add this CSS code to the template's custom CSS section or to the page where the images are located. Keep in mind that this solution assumes that the images with captions have a specific class assigned to them, so make sure to update the CSS code with the correct class name if necessary.

Let me know if you have questions
Thanks

Thanks
Ellen Litwack
Buddy Assignment Help

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #67783 by Mikael
That almost did the trick, had to make a minor change, and captioned images now resize on my iPhone:
Code:
@media (max-width: 767px) { .easy_img_caption { width: 100% !important; height: auto !important; } }

As reference for others:  You add this to /media/templates/site/cassiopeia/css/user.css

/Mikael
The following user(s) said Thank You: ced1870

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #67787 by ced1870
thank you for your feedback and sharing your code !
I was busy with my websites mgration until now. I will add your code in the next release

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.208 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1215 guests and one member online