Desktop Only Padding

Topic summary

Issue: After implementing an accordion footer for mobile, the desktop/standard layout showed footer menu headings too close to the top. The requester wanted top padding applied only on non-mobile (where the accordion isn’t used).

Solutions provided:

  • Theme code edit: Add CSS in theme.liquid (before ) to increase top padding on desktop only. Confirmed to fix the issue.
  • No-code/Admin approach: Add Custom CSS in the Footer section using a media query so it only applies when the screen is wider than 750px (when the accordion disappears), e.g., target .footer__blocks-wrapper with padding-top. This also achieved the desired spacing and is advantageous if theme updates revert code edits.

Notes:

  • The core tactic is a desktop-only media query (min-width: 750px) applying padding-top to the footer container.

Outcome: Resolved. Both methods work; the Custom CSS route is highlighted as update-safe and easy to manage.

Summarized with AI on December 17. AI used: gpt-5.

Hello, I’ve added a code for an accordion footer and the padding I’ve placed around my menu titles is fine. However when in the standard layout the menu headings are too close to the top.

How do I add padding to the top of the footer on the non-mobile version only?(or rather any version that won’t adopt the accordion)

Hi @PoW8 !

Could you share your store password?

1 Like

pw:teunti

@PoW8 ,

Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above tag:


Result:

If it helps you, please like and mark it as the solution.

Best Regards :blush:

1 Like

Thanks, this does exactly what I needed.

1 Like

Awesome! You can solve this by adding Custom CSS to the Footer in Admin.

This method adds padding to the top of footer__blocks-wrapper when the screen is wider than 750px (when your accordion disappears).

Once in Admin, click Footer and go to the side bar.

Add this Custom CSS:

For copy and paste:

@media (min-width: 750px) {
  .footer__blocks-wrapper {
    padding-top: 1.5rem;
  }
}

This will achieve this:

Hope this helps!

1 Like

Also valid. Especially in case Shopify updates start removing all code but custom CSS again.

1 Like