A user reduced an image size in their Shopify featured product section but encountered alignment issues—the image appears too high and too far left.
Solutions Proposed:
Two community members provided CSS code snippets to fix the alignment:
First solution: Add margin adjustments (margin-top: 69px, margin-left: 90px) to the responsive-image class within the specific Shopify section, targeting screens 768px and wider
Second solution: Apply width and height constraints (80%) directly to the product-media-object div, with justify-self and align-self properties set to center and baseline
Implementation steps:
Both solutions require accessing the theme’s CSS file (theme.css, base.css, or style.css) through Shopify admin → Online Store → Themes → Edit code, then pasting the provided code at the bottom of the file.
The discussion remains open with no confirmation from the original poster about which solution worked.
Summarized with AI on November 3.
AI used: claude-sonnet-4-5-20250929.
I’ve just reduced the size of my image in below featured product section, however it’s now too high and too much to the left. Can I add anything to below code to align it properly?
From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
Find the theme that you want to edit and click on “Actions” and then “Edit code”.
In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code: