Removing space between custom liquid sections

Solved

Removing space between custom liquid sections

rgoldberg
New Member
6 0 0

So on this page I have three custom liquid blocks towards the bottom. There is a small amount of white space between each of them but as far as I can see from the code it is not padding or margin, the div just outside the content is ever so slightly taller. Does anyone know what is causing this?

Accepted Solution (1)
Natasha-Saed
Shopify Partner
420 46 77

This is an accepted solution.

NatashaSaed_1-1700080226887.png

 

Please let me know if you know how to add the code, if not I will send you detailed steps to walkyou through it.

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint

View solution in original post

Replies 13 (13)

Spac-es
Shopify Partner
384 110 134

Do you mean this space?

 

Captura de pantalla 2023-11-15 174924.png

It is caused by custom liquid that you added to your code from the Shopify customizer.

Just delete it.

 

Any donation is welcome! https://www.buymeacoffee.com/spacescoffee Thanks in advance!
Spac-es
Shopify Partner
384 110 134

If you can't find this custom code, simply add this code to your theme.liquid:

<script>
  document.addEventListener('DOMContentLoaded', function() {
    var recommendationsSection = document.querySelector('.shopify-section-template--21550427177269__product_recommendations');
    if (recommendationsSection) {
      recommendationsSection.style.display = 'none';
    }
  });
</script>
Any donation is welcome! https://www.buymeacoffee.com/spacescoffee Thanks in advance!
rgoldberg
New Member
6 0 0

No, sorry, I should have included a picture. Theses are 3 separate custom liquidsScreenshot 2023-11-15 140012.png

Natasha-Saed
Shopify Partner
420 46 77

Hi,

You can surround the custom code with <div style="margin-top: -10px;> fix it until the images touch the edges this will solve the issue the space is the main container for the custom liquid block. 

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint
rgoldberg
New Member
6 0 0

Where exactly are you suggesting that be put? in the custom liquid block?Screenshot 2023-11-15 142609.png

rgoldberg
New Member
6 0 0

I don't think it has anything to do with the margins because when I inspect it this there are none.

Natasha-Saed
Shopify Partner
420 46 77

Yes its not margin or padding its the container for the custom liquid

 

just add at the top:

<div style = "margin-top: -10px">

 

close </div> at the bottom 

 

save and check and let me know if it work if not give me collaborator access to fix it for you

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint
rgoldberg
New Member
6 0 0

Sadly adding that to the top of the custom liquid block only clips the image inside still keeping the white borders. Also sorry I would be unable to give you collaborator access.

Natasha-Saed
Shopify Partner
420 46 77

I found the problem : 

NatashaSaed_0-1700079849774.png

 

Give me a few minutes and will let you know how to solve this

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint
Natasha-Saed
Shopify Partner
420 46 77

This is an accepted solution.

NatashaSaed_1-1700080226887.png

 

Please let me know if you know how to add the code, if not I will send you detailed steps to walkyou through it.

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint
rgoldberg
New Member
6 0 0

Amazing, that worked, I had the text-center isolated as something that changed this section but no clue why line-height is adding to that. Thank you!

 

Natasha-Saed
Shopify Partner
420 46 77

You are welcome glad I could help. 

 

Have a nice day.

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint
Bronziekee
New Member
13 0 0

HI Natasha,
I have a similar problem and I have tried everything to resolve this. Just need the space above my custom liquid video to be removed here.  What is the best way to get rid of this on the top page?

Bronziekee_0-1717065213068.png