Shrink Section Title

Topic summary

Goal: Reduce the “Best Selling Products” section title’s vertical spacing (top/bottom) and slightly decrease its font size on mobile in a Shopify Influence theme.

What was tried:

  • CSS with media queries was added to base.css to adjust .best-sellers-section .title font sizes at ≤767px, ≤475px, and ≤390px. The merchant saw no change after implementing it.
  • A second CSS proposal adjusted both font-size and padding for .slider-section-heading h2.title and .best-sellers-section .title, including mobile-specific rules. Screenshots showed a centered title with some spacing reduced.

Current need/clarification:

  • The merchant still wants more reduction of the vertical white space around the title on mobile to bring the best sellers section higher, while keeping the title centered.
  • A helper asked if centering should change; the merchant confirmed it should remain centered and only the white space should be reduced.

Status:

  • No final resolution yet. The remaining issue is excess vertical white space around the title on mobile. Screenshots are important to visualize the gap.
Summarized with AI on December 26. AI used: gpt-5.

I want to reduce the top and bottom margins for the “Best Selling Products” title on mobile as well as reduce the font size to be a few points smaller (reduce by 5 to start with). Any custom code would be greatly appreciated.

Shop Link: https://www.exploresherpa.com/

I am using an Influence theme.

2 Likes

This is Noah from PageFly - Shopify Page Builder App

Hi @Explore-Sherpa Please add code here to fix it:

Step 1: Online Stores > Themes > Edit code

Step 2: Choose file base.css
Step 3: Add code in the end that file.

@media screen and (max-width: 767px) {
    .best-sellers-section .title {
        font-size: 20px !important;
    }
}

@media screen and (max-width: 475px) {
    .best-sellers-section .title {
        font-size: 20px !important;
    }
}
@media screen and (max-width: 390px) {
    .best-sellers-section .title {
        font-size: 16px !important;
    }
}

Hope my solution will help you resolve the issue.

Best regards,

Noah | PageFly

1 Like

I tried to implement the code as you said, but I am seeing no changes. Am I doing this correctly?

Hi @Explore-Sherpa

Check this one.

From your Shopify admin dashboard, click on “Online Store” and then “Themes”.

Find the theme that you want to edit and click on “Actions” and then “Edit code”.

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:

.slider-section-heading h2.title {
    padding: 39px;
    font-size: 31px;
}
@media screen and (max-width: 767px) {
    .best-sellers-section .title {
        padding: 30px !important;
        font-size: 26px !important;
    }
}
@media screen and (max-width: 475px) {
    .best-sellers-section .title {
        padding: 0px !important;
        font-size: 26px !important;
    }
}

And Save.

result:

Thank you for the code, but I also wanted to reduce the top and bottom margins more.

Hi @Explore-Sherpa Thank you so much. But I see it show center. I don’t know if you have any changes. That means you don’t want it centered and low to the bottom margin, right?

I want to remove the white space marked in blue in order to bring our best sellers up a bit more on mobile. I still want it centered.