Related products not aligned properly, as well as product image looks on the mobile

Topic summary

A Shopify store owner reported two layout issues: related products section misaligned to the left instead of centered, and mobile product pages displaying all images at once rather than in a carousel format.

Root Cause:
A CSS conflict was affecting the grid layout. Specific CSS code was overriding the original display properties for the .grid class.

Solution Process:

  • User was directed to locate the problematic CSS in base.css
  • Initial instruction to add !important to display: flex at line 884 of the .grid class
  • First attempt failed due to incorrect placement
  • Second attempt failed because of a missing semicolon after !important
  • After adding the semicolon correctly, the alignment issue was resolved

Status: Issue resolved successfully. The related products section now displays properly centered on the page.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

Hi everyone, so we had trouble regarding the “related products” section, it’s now aligned to the left where it supposed to be in the middle of the page. Also the preview for producy page on the mobile version showing all images instead of carousel.

Here’s the preview of our unlaunch website: https://y83psuuncubrjxkf-48511254689.shopifypreview.com

Please help, thank you!

Hi CharStaff,

This CSS is affecting the original layout. If you check removing that, it will work properly. If you’re using that CSS somewhere then have added a parent class for the same

Feel free to reach out if you have any questions

Hi, where can we find that css, it is on base.css?

Hii,

In base.css, you can find .grid class and add !important to display: flex CSS, Like display: flex !important

Hi, it’s still like this after I added the “flex !important”, image attached

Not this one, check for this .grid class at line no. 884

it’s here under the line no 880

and it’s still like this

The ; is missed at the end. After !important

thank you so much, it works!