Solved

How to apply custom CSS padding rule only to desktop?

Mathias8hrS
Excursionist
46 0 16

Hi,

For my webshop, I'm trying to adjust the padding of my shopify reviews on the product pages for the desktop version of the site, for which I added the following code to my theme.scss.liquid file:

#shopify-product-reviews > div {
    padding-left: 150px;
  padding-right: 150px;
}

However, I want this padding to only be applied on the desktop website version, and not on the mobile version (where I don't want any padding at all). What should I add to the code in order for it to NOT apply on mobile but only on desktop?

Thank you in advance.

Kr,

Mathias

Accepted Solution (1)

Developer-G
Shopify Partner
3079 604 856

This is an accepted solution.

Use with media query

@media screen and (min-width: 900px) {
#shopify-product-reviews > div {
    padding-left: 150px;
  padding-right: 150px;
}
}
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter

View solution in original post

Replies 2 (2)

Developer-G
Shopify Partner
3079 604 856

This is an accepted solution.

Use with media query

@media screen and (min-width: 900px) {
#shopify-product-reviews > div {
    padding-left: 150px;
  padding-right: 150px;
}
}
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store Hire me.
- Email: guleriathakur43@gmail.com - Skype: navrocks1 ,
- Try GEMPAGES a great page builder
-Advance Search Filter
Mathias8hrS
Excursionist
46 0 16

@Developer-G Cheers! That worked smoothly