og1char Posted October 3, 2023 Posted October 3, 2023 (edited) Hi, I've looked for the answer in lots of places and not found an answer or a definite "it can't be done". So hopefully someone can help. My client's store product listing page has the images in a fixed aspect ratio. They are selling artworks and so they need to be displayed in their original ratio or the artists are understandably aggrieved. There is an inline style "element.style { object-fit: 'cover';} " which I want to change to object-fit: 'contain' Is it possible to override the inline style for all images displayed on the Listings Page? element.style { width: 100%; height: 100%; object-position: 50% 50%; object-fit: contain; } Thank you Edited October 3, 2023 by og1char add DevTools style
tuanphan Posted October 6, 2023 Posted October 6, 2023 Hi, What is store page url? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
og1char Posted October 17, 2023 Author Posted October 17, 2023 Hi, If you could take a look that would be great. The link is: https://www.forgottencoastenpleinair.com/artworks Password is: password Thanks
tuanphan Posted October 19, 2023 Posted October 19, 2023 Add this to Website Tools (under Not Linked) > Custom CSS div.grid-item img { object-fit: contain !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
og1char Posted December 1, 2023 Author Posted December 1, 2023 Very delayed reply... It worked. Thank you.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment