Image resize on mobile - not working

Replied by buddyhelp on topic Image resize on mobile - not working

Posted 1 year 1 month ago #67667
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.

Replied by Mikael on topic Image resize on mobile - not working

Posted 1 year 1 month ago #67783
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
by Mikael
The following user(s) said Thank You: ced1870

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

Replied by ced1870 on topic Image resize on mobile - not working

Posted 1 year 1 month ago #67787
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

by ced1870

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

Time to create page: 0.752 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1236 guests and no members online