How do I change the padding around the Instafeed app?

Topic summary

Users are seeking to remove or adjust padding and margins around the Instafeed app on their Shopify storefronts. The main issue involves unwanted white space appearing above and/or below the Instagram feed.

Primary Solution Provided:

  • Access Shopify Admin β†’ Online Store β†’ Themes β†’ Actions β†’ Edit Code
  • Locate the </body> tag in the theme.liquid file
  • Insert custom CSS code above </body> with negative margin values (e.g., -60px for desktop top spacing, -40px for mobile)
  • The negative prefix is essential for the code to work properly

Additional Requests:
One user wants to eliminate both top and bottom margins while ensuring Instagram photos span full width without distortion once spacing is removed.

Status: The solution successfully resolved the padding issue for at least one participant. The discussion remains helpful for others facing similar layout challenges with the Instafeed app.

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

Hello! I am trying to remove the top padding showing above my instafeed app. I can easily remove using the inspect tool, but cannot find the instafeed code sheet to edit on the back end. Can anyone help? The white bar above the feed is the padding I wish to remove.

Changing the margin to 0px is what is working in the inspect tool. See below.

#insta-feed, .instafeed-shopify {
position: relative;
display: block;
box-sizing: unset;
text-align: center;
clear: both;
margin: 0px auto 0;

}

1 Like

Hello @thelittlehousek ,

Please share:

  • your store URL;
  • page URL with the issue you mention;
  • storefront password (if your store has one).

If the store is not online yet, please follow this quick tutorial to learn how to safely and temporarily share an offline/unpublished theme URL.

Kind regards,
Diego

Here is the preview of my unpublished storefront: https://zhdhrz32jmht8lx5-36138418312.shopifypreview.com

@diego_ezfy

It is the bottom bar right before the footer.

Good day.

maybe you can share the url of shop?

so I can send you the correct CSS code.

P.S. Just want to help you with that white border for free

@thelittlehousek ,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. In your theme.liquid file, find the (press CTRL + F or command + F on Mac)
  3. paste this code right above the tag:

-60px = top spacing desktop

-40px = top spacing mobile

make sure you add the - sign as a prefix, it needs to be a negative number to work.

If it helps you please click on the β€œlike” button and mark this answer as a solution!

Thank you.

Kind regards,
Diego

3 Likes

Thank you so much, I was desperate to find a solution!

A big THANKS :slightly_smiling_face:

Julien

Hi there Diego!

Hope all is well.

I’m looking to accomplish something similar, but I’d like to get rid of both the top and bottom margings/padding, as well as set it up so that the Instafeed Photos can take up full width (once the margins are gone) without getting distorted.

Any help would be greatly appreciated!

Thanks,

Pat