Mobile view collection page padding

Hi community :slightly_smiling_face: Does anyone know the best way to add some slight padding to my collection page edges on mobile view only?? I don’t want it to change desktop view where possible, but currently my product text is getting ever so slightly cut off on mobile. Please see example below of the mobile view. Thank you!

URL - https://oliviarosethelabel.com/ (PASSWORD: dowmew)

2 Likes

@emilyaugstudios , you can use css code at the end of theme.css file

@media only screen and (max-width: 768px) {
  .shopify-section--main-collection {
    padding: 0px 12px!important;
  }
}

Result:

1 Like

Do you want like this @emilyaugstudios ?

Hi @emilyaugstudios

Check this one.

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

@media only screen and (max-width: 749px){
.collection {
    padding: 10px;
}
}

And Save.

Result:

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

  • Then find the theme.liquid file.
  • Then add the following code at the before tag and press ‘Save’ to save it.

  • Here is the result you will achieve:

  • Please press ‘Like’ and mark it as ‘Solution’ if you find it helpful. Thank you.
1 Like