Removing Top Margin From Footer Only on Homepage

Solved

Removing Top Margin From Footer Only on Homepage

Aaron-Mihell
Excursionist
43 0 11

Hi,

 

I am trying to remove the top margin (set to 0px) from the footer, but have it only affect the homepage.

 

I am using the Ride theme.

 

URL: https://lycralab.myshopify.com/

 

If anyone could help, it would be greatly appreciated.

 

Thanks,

Aaron

Accepted Solution (1)
BiDeal-Discount
Shopify Partner
470 55 110

This is an accepted solution.

Oh I see it was overriden by another

 

Screenshot 2025-04-28 at 23.40.35.png

 

Let adjust by this code:

.homepage-footer {
  margin-top: 0px !important;
}
- Helpful? Like & Accept solution!
- BiDeal Bundle Volume Discounts: Upsell with bundles, quantity breaks, volume discounts. AOV+ with gifts, shipping & progressive cart
- Bify app: Shopify automatic discount solutions
- Contact me? support@bify.app or WhatsApp: +84974709330

View solution in original post

Replies 10 (10)

topnewyork
Astronaut
1368 165 224

Hi @Aaron-Mihell 
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>

<style>
  footer.footer.color-scheme-0245407c-fefe-443e-80c4-87012aefe9a5.gradient.section-sections--15823399977003__footer-padding {
    margin-top: 0rem !important;
}
</style>

If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
Aaron-Mihell
Excursionist
43 0 11

Hi @topnewyork,

 

Thank for your reply.

 

I followed the steps you mentioned but unfortunately it affected the entire website instead of just the homepage. Is there a way to just target the homepage?

 

Thanks,

Aaron

BiDeal-Discount
Shopify Partner
470 55 110

Hi @Aaron-Mihell 

If you only want to set margin for homepage footer, let follow step :

- go to edit code your current theme, find the footer.liquid 

BiDealDiscount_0-1745851819308.png

 

let add this condition to footer class:

{% if template == 'index' %} homepage-footer {% endif %}

 

and then add style for this class:

.homepage-footer {
    margin-top: 0px;
  }
- Helpful? Like & Accept solution!
- BiDeal Bundle Volume Discounts: Upsell with bundles, quantity breaks, volume discounts. AOV+ with gifts, shipping & progressive cart
- Bify app: Shopify automatic discount solutions
- Contact me? support@bify.app or WhatsApp: +84974709330
Aaron-Mihell
Excursionist
43 0 11

Hi @BiDeal-Discount,

 

Thank for your reply.

 

This did work but only for the mobile version of the site. For some reason it reverts back to how it was when the page width is 750px and above.

 

Thanks,

Aaron

BiDeal-Discount
Shopify Partner
470 55 110

Hi @Aaron-Mihell 

You should add style of .homepage-footer outside of any @media . Let check carefully my attachment of previous comment

- Helpful? Like & Accept solution!
- BiDeal Bundle Volume Discounts: Upsell with bundles, quantity breaks, volume discounts. AOV+ with gifts, shipping & progressive cart
- Bify app: Shopify automatic discount solutions
- Contact me? support@bify.app or WhatsApp: +84974709330
Aaron-Mihell
Excursionist
43 0 11

Hi @BiDeal-Discount,

 

I definitely added the code exactly as you showed in the screenshot.

BiDeal-Discount
Shopify Partner
470 55 110

did you apply to your store https://lycralab.myshopify.com/ ?
I've just check but don't see any class added on footer tag.

If not, please update to let me check on that

- Helpful? Like & Accept solution!
- BiDeal Bundle Volume Discounts: Upsell with bundles, quantity breaks, volume discounts. AOV+ with gifts, shipping & progressive cart
- Bify app: Shopify automatic discount solutions
- Contact me? support@bify.app or WhatsApp: +84974709330
Aaron-Mihell
Excursionist
43 0 11

Apologies, I removed the code because I was testing.

 

I have added it back now.

BiDeal-Discount
Shopify Partner
470 55 110

This is an accepted solution.

Oh I see it was overriden by another

 

Screenshot 2025-04-28 at 23.40.35.png

 

Let adjust by this code:

.homepage-footer {
  margin-top: 0px !important;
}
- Helpful? Like & Accept solution!
- BiDeal Bundle Volume Discounts: Upsell with bundles, quantity breaks, volume discounts. AOV+ with gifts, shipping & progressive cart
- Bify app: Shopify automatic discount solutions
- Contact me? support@bify.app or WhatsApp: +84974709330
Aaron-Mihell
Excursionist
43 0 11

@BiDeal-Discount

 

Thank you so much for your help, it works perfectly!