Personalized checkout and custom promotions with Shopify Scripts
Hi!
Im trying to add custom CSS to a product grid and keep getting an error notice that I cant save the changes.
(Reason: I have my pictures set to landscape in my Theme options, however for this particular collection all pictures are in portrait mode, so I wanted to use custom CSS to have them displayed in portrait only for this collection. They need to be centered over the product name and not weirdly cropped).
img {
display: block;
max-width: 220px;
max-height: 130px;
width: 50%;
height: 100%;
display: flex;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
This was the original Code I wanted to save, but I read in another post that position: absolute cant be used so i reduced it to
img {
width: 50%;
height: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
However im still getting the same error notice.
Help is very appreciated.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025