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
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
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
If you only want to set margin for homepage footer, let follow step :
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;
}
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
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
You should add style of .homepage-footer outside of any @media . Let check carefully my attachment of previous comment
Hi @BiDeal-Discount ,
I definitely added the code exactly as you showed in the screenshot.
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
Apologies, I removed the code because I was testing.
I have added it back now.
Thank you so much for your help, it works perfectly!