How to stop text overlap on product cards on mobile view

jewellerystore1
Excursionist
76 0 8

Hello, 

 

I am experiencing an issue with my product card text only on mobile view where the text is over lapping. Can someone please share the code to make the text relative to the image card? Thank you!

 

Using dawn theme, on a draft theme: https://skmzt94bl2o6uw3j-74563387678.shopifypreview.com

 

Screen Shot 2024-03-28 at 3.58.11 pm.png

Replies 5 (5)

Van_Nguyen_GSG
Shopify Partner
148 22 40

Hi there,

 

Add the below code to the bottom of global CSS file (Ex: base.css):

 

@media only screen and (max-width: 750px) {
  .collection . slider-mobile-gutter .product-card-wrapper .card--standard .card- 
   information {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 1em;
  }

  .collection . slider-mobile-gutter .product-card-wrapper .card--standard .card- 
   information>*:not(.visually-hidden:first-child)+*:not(.rating) {
    text-align: left;
  }
}

 

It will looks like this on mobile:

skmzt94bl2o6uw3j-74563387678.shopifypreview.com_(iPhone 14 Pro Max).png

Helping Shopify merchants build stores that convert.
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- If you still need help, feel free to reach out to me at: van@glue.sg
Cheers!
jewellerystore1
Excursionist
76 0 8

Hi, I added this to to base.css but it hasn't change anything?

 

Thank you!

jewellerystore1
Excursionist
76 0 8

I added this code then removed it but now the code is showing on my website down the bottom!! Can you please help remove it? I am on the same preview. Thank you

 

Screen Shot 2024-03-31 at 7.34.58 pm.png

PageFly-Oliver
Astronaut
861 180 161

Hi @jewellerystore1 

 

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file -> Save

 

<style>
@media(max-width:767px){
.collection .card--standard>.card__content .card__information h3.card__heading{
margin-bottom: 0;
text-align: center;
}
.collection .card-information .price{
text-align: center;
}
}
</style>

 

 

Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

jewellerystore1
Excursionist
76 0 8

Hello, thanks for you help but I would like the title to be left aligned and price right aligned instead of centred. Thanks!