Reduce padding title and text Dawn Theme

Topic summary

A user needed to reduce padding between the title and collapsible content sections on their product page, specifically on mobile devices only, in the Dawn theme.

Initial Solution:

  • First response provided CSS code to reduce spacing by targeting .collapsible-content__heading and .collapsible-content__grid
  • However, this affected both mobile and desktop views

Final Solution:

  • Wrapped the CSS in a media query (@media only screen and (max-width: 749px)) to target only mobile screens
  • Code targets .collapsible-content__grid > div:nth-child(1) and .collapsible-content__header-container h2
  • Added to base.css file in the theme’s Assets folder

Status: Resolved - The mobile-specific solution successfully reduced padding without affecting desktop layout.

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

Hello,

I would like to reduce the padding only on mobile between the title and the collapsible content on my product page but I don’t know how to do.

Does anyone know how to do this please?

Website: https://6f3exa-pb.myshopify.com/

1 Like

Hi @Ulysse12342

  • You can try to follow this step
    Step 1: Go to Edit code
    Step 2: Find file base.css and add this code at the end of the file
h2.collapsible-content__heading.inline-richtext.h2 {
    margin-bottom: 0 !important;
}

.collapsible-content__grid {
    margin-top: -25px !important;
}

Result:

Best,

Liz

1 Like

Thanks it’s working but it also moves the padding on computer, is it possible to only do it on mobile please?

Hi @Ulysse12342

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
@media only screen and (max-width: 749px){
.collapsible-content__grid > div:nth-child(1) {
    margin-top: 0;
}

.collapsible-content__header-container h2 {
    margin-bottom: 0;
}
}

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

1 Like

It’s perfect thanks!