All things Shopify and commerce
I want to adjust my picture size to 50% of the container width. The only option I see in the editor is to set it to a specific pixel width. It looks great on desktop, but horrible on mobile. This is an example of the code I am trying to edit:
<div style="text-align: left;"><img style="margin-right: 10px; float: left;" alt="Parlor Palm in Sunlight" src="https://cdn.shopify.com/s/files/1/0664/8522/3619/files/sunlight_480x480.png?v=1732194399"></div>
From this URL: https://chicplantboutique.com/blogs/all-things-planty/houseplant-myths-debunked-the-truth-about-ligh...
Thanks!!
Solved! Go to the solution
This is an accepted solution.
Hey @ChicPlantBoutiq
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<style>
@media screen and (max-width: 767px) {
.article-template__content.page-width.page-width--narrow.rte.scroll-trigger.animate--slide-in img {
max-width: 50% !important;
}
}
</style>
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
This is an accepted solution.
Hey @ChicPlantBoutiq
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<style>
@media screen and (max-width: 767px) {
.article-template__content.page-width.page-width--narrow.rte.scroll-trigger.animate--slide-in img {
max-width: 50% !important;
}
}
</style>
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Thank you so much! That is exactly what I needed! You're the best 🙂
Thank you for your reply. I'm glad to hear that the solution worked well for you. If you require any more help, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.
Try this, <div style="text-align: left;width: 100%;"><img style="margin-right: 10px; float: left;max-width:50%" alt="Parlor Palm in Sunlight"
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024