A user needed help resizing collage images to a square ratio in Shopify’s Dawn theme, specifically for collection and featured product sections.
Initial Solution:
GemPages provided CSS code to be added to the base.css file
Code targets specific section IDs to set aspect-ratio: 1/1 and object-fit: cover for square images
The solution worked successfully on desktop
Additional Requests Addressed:
Semi-transparent text background: CSS code added using rgba(21,19,39,0.7) for background-color on card elements
Mobile cropping issue: Custom CSS provided to maintain original image ratio on mobile devices using media queries and adjusted aspect-ratio percentages
Text alignment on mobile: Final code snippet adjusted flex-grow property to improve text positioning
Resolution:
All issues were successfully resolved through iterative CSS customizations. The user expressed satisfaction with the complete solution, which involved multiple code additions to the theme’s base.css file targeting specific collage section IDs.
Summarized with AI on November 23.
AI used: claude-sonnet-4-5-20250929.
hi, I need help with my collage for dawn theme. I was wondering if anyone knows the code to resize only the images for my collection and featured product in my collage to a square ratio. Thanks in advance
Thank you so, so much! Your code worked perfectly. I also, need help in adding a semi-transparent or opaque background for my text in the collage for both my featured product and collection. I can’t seem to change the background color for it. Thanks in advance
For the main image, it shows up perfect on desktop but on mobile, it gets cropped even though I selected to keep the original image ratio. Would you happen to know how to fix that? Thanks.