A Shopify store owner using the Dawn theme is struggling to properly resize product images on their collection page and align the accompanying text. After initially adding CSS to reduce image size (width: 60%), the text became misaligned with the images.
The user needs:
Product images scaled down with more breathing space
Text left-aligned (not centered) and properly positioned with the resized images
Troubleshooting attempts:
Multiple developers (rajweb, Mustafa_Ali, B2Bridge) offered CSS solutions targeting .product-card-wrapper, .card__inner, .card__information, and related classes. Solutions included using max-width, flexbox properties, and !important declarations.
Current status:
Despite several code iterations, the alignment issue persists. The user shared screenshots and their store URL (afterstudio.in/collections/all) showing the problem. The most recent responses include:
rajweb providing updated CSS with flexbox alignment
Mustafa_Ali suggesting code placement in theme.liquid under <style> tags
rajweb sharing a screenshot of a potential solution
The discussion remains ongoing as the user awaits confirmation that the latest suggestions resolve both the image sizing and text alignment issues.
Summarized with AI on October 30.
AI used: claude-sonnet-4-5-20250929.
In Shopify’s Dawn theme, the misalignment of text and images in the collection or product grid can be fixed by ensuring that product titles and prices align consistently with the product images. Here’s how you can fix it:
Check for Unequal Heights:
Shopify Dawn theme uses a CSS grid or flexbox to arrange product images and text. If product titles, descriptions, or prices are of different lengths, they can cause misalignment.
Use CSS to Align Text with Images:
To force consistent alignment, you can add the following CSS:
Follow these steps:
Go to Online Store
Edit Code
Find theme.liquid file
Add the following code in the bottom of the file above tag
If I was able to help you, please don’t forget to Like and mark it as the Solution!
If you’re looking for expert help with customization or coding, I’d be delighted to support you. Please don’t hesitate to reach out in my signature below—I’m here to help bring your vision to life!
I see the issue! Your .product-card-wrapper .card__inner is making the images smaller, but it’s not keeping the layout aligned properly. Let’s fix both issues:
.product-card-wrapper .card__inner {
max-width: 300px !important; /* Adjust size as needed */
margin: 0 auto !important; /* Centers the image */
}
.card__media img {
width: 100% !important; /* Makes sure images fit inside */
height: auto !important; /* Maintains aspect ratio */
object-fit: cover !important; /* Ensures uniform image display */
}
This keeps all product images the same size while maintaining aspect ratio.
Align Product Text with the Image (Left-Aligned):
.product-card-wrapper {
display: flex !important;
flex-direction: column !important;
align-items: flex-start !important; /* Aligns everything to the left */
}
.card__information {
text-align: left !important; /* Ensures text starts from the left */
width: 100% !important; /* Makes sure text spans full width */
padding-left: 0 !important; /* Removes unnecessary padding */
}
.card__heading, .price {
text-align: left !important;
margin-left: 0 !important; /* Ensures text stays aligned */
}
This ensures that the text sits directly under the image and aligns properly to the left.
ADD Code:
Go to Shopify Admin → Themes → Edit Code
Open assets/base.css
Replace or add the above CSS at the bottom of the file Save & Refresh your collection page
This should now properly resize the images and align the text correctly without any interference from other styles! Let me know if you need more tweaks.
hey @HELLO2997 Go to online store ----> themes ----> go to three Dots ----> edit code ---->find theme.liquid files ----> place the code ---->
under the tag before the body ----->
if this code work please do not forget to like and mark it solution