We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to resize the box height of the product and make it smaller?

Solved

How to resize the box height of the product and make it smaller?

Mamdouh_USD
Excursionist
38 0 6

Hello all,

 

I want to make the box height of the product smaller.

 

Store URL: https://u7yeji-na.myshopify.com/ar/products/nova-water-40-plastic-bottles-x-330-ml

 

IMG_6994.PNG

Accepted Solution (1)

Sayed_Safin
Shopify Partner
101 1 2

This is an accepted solution.

Assalamualaikum, @Mamdouh_USD , Please follow this steps - 

  1. Go to the edit code
  2. Sayed_Safin_0-1751136469686.png

     

  3. search for file section-main-product.css
  4. Add the given css code at the bottom of the file.
  5. Click on save and check the preview of your store.

Thanks!

@media screen and (max-width: 749px) {
  .product__modal-opener .product__media.media{
     height:32dvh; 
     padding-top:0;
  }
}

 

- Need a Shopify Specialist? Visit Here



- Custom Design | Advanced Coding | Store Migration | Custom Schema and app Integration


- Conversion Rate Optimization | AB Test Development

View solution in original post

Replies 5 (5)
Mamdouh_USD
Excursionist
38 0 6

Hi @kate_group, yes.

Sayed_Safin
Shopify Partner
101 1 2

This is an accepted solution.

Assalamualaikum, @Mamdouh_USD , Please follow this steps - 

  1. Go to the edit code
  2. Sayed_Safin_0-1751136469686.png

     

  3. search for file section-main-product.css
  4. Add the given css code at the bottom of the file.
  5. Click on save and check the preview of your store.

Thanks!

@media screen and (max-width: 749px) {
  .product__modal-opener .product__media.media{
     height:32dvh; 
     padding-top:0;
  }
}

 

- Need a Shopify Specialist? Visit Here



- Custom Design | Advanced Coding | Store Migration | Custom Schema and app Integration


- Conversion Rate Optimization | AB Test Development

PaulNewton
Shopify Partner
8031 688 1649

@Sayed_Safin use custom css settings first before recommending merchant modify code files.

https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/add-css

 

Otherwise when a merchant inevitably messes up there theme it wont be a "simple" style it'll be doing free theme repair work.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Sayed_Safin
Shopify Partner
101 1 2

@PaulNewton Thanks for the valuable suggestions.

- Need a Shopify Specialist? Visit Here



- Custom Design | Advanced Coding | Store Migration | Custom Schema and app Integration


- Conversion Rate Optimization | AB Test Development

Mamdouh_USD
Excursionist
38 0 6

Waalaikumsalam @Sayed_Safin

 

It worked perfectly. Thank you 🙂