How can I reduce the size of my mobile header?

Topic summary

A user seeks to reduce excessive black space around their logo in the mobile header of their Shopify store.

Solutions Provided:

Three different community members offered CSS-based solutions:

  • PageFly-Oliver: Suggested adding custom code to the theme.liquid file (specific code appears corrupted in the thread)
  • ZenoPageBuilder: Recommended inserting CSS into base.css targeting .header--mobile-center with padding adjustments set to 0 !important
  • Dan-From-Ryviu: Proposed adding code to theme.liquid before the </head> tag

All solutions involve editing theme code files within Shopify’s admin panel. Screenshots were shared showing the implementation steps and expected results.

Outcome:

The original poster confirmed success with one of the solutions, thanking the community. The issue appears resolved, though the specific solution used wasn’t explicitly identified.

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

Hi!

im wondering if it’s possible to reduce the size of the mobile header? I have lots of black space around my logo and would like the header to be a bit smaller :slightly_smiling_face:
Preview link of my store is https://0q4y9pn25qi3so13-8439839.shopifypreview.com

Hi @Gypsymoon ,

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.liquid

Step 3: Paste the below code at the bottom of the file → Save


Hope my solution works perfectly for you!

Best regards,

Oliver | PageFly

Hello @Gypsymoon :waving_hand:

Inside Shopify Admin, you can go to Edit theme code, open file base.css and add this code at the bottom

.header--mobile-center {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

The result

Hope that helps!

1 Like

Hi @Gypsymoon

You can add this code to your theme.liquid file before tag to do that


Thank you so much!!

1 Like

You are welcome!