.image-block–AeCtaYlUvczBYYVJ1R__image_8ky3Ee .image-block__image { width: 100%; height: auto; object-fit: cover; }
This did not produce the desired result.
Status: Requesting guidance on the correct CSS/approach to enforce a 50% width image without padding on product pages. No solution or consensus yet; discussion remains open.
Summarized with AI on December 12.
AI used: gpt-5.
You’re super close — the issue isn’t your CSS, it’s that Shopify’s online store editor wraps most product-page blocks inside a parent container that already has padding + a max-width. So even if you force the image itself to be 50%, the container around it keeps squeezing it.
To fix it properly, you need to override the container and the image block.
Try this instead:
/* Remove container limits for this specific image block */
.image-block--AeCtaYlUvczBYYVJ1R__image_8ky3Ee {
width: 50vw !important; /* Takes exactly half the viewport width */
max-width: none !important;
padding: 0 !important;
margin: 0 !important;
}
/* Make the actual image fill that 50% space */
.image-block--AeCtaYlUvczBYYVJ1R__image_8ky3Ee .image-block__image {
width: 100% !important;
height: 100% !important;
object-fit: cover;
display: block;
padding: 0 !important;
margin: 0 !important;
}
Also you can share your store’s theme so we can send you a exact code for this.