How do I decrease the space between two sections even when there's no padding

Solved

How do I decrease the space between two sections even when there's no padding

lukafernada
Excursionist
100 0 39

I would like to decrease the space here on my home screen, just for mobile view:

 

Image 22-09-2024 at 00.46.jpeg

Accepted Solution (1)

BSS-TekLabs
Shopify Partner
2350 701 826

This is an accepted solution.

- Here is the solution for you @lukafernada 
- Please follow these steps:
1. Go to Online Store --> Theme --> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head> and press 'Save' to save it

<style>
@media only screen and (max-width: 600px) {
section#shopify-section-template--20584607220061__d3b96308-edf5-416e-8b72-5e268477c7ba {
    margin-top: -40px !important;
}
}
</style>

- Here is the result you will achieve:

BSSTekLabs_0-1726974607448.png

 

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

View solution in original post

Replies 3 (3)

BSSCommerce-B2B
Shopify Partner
1718 512 575

Hi @lukafernada , 

Step 1: Go to Admin -> Online store -> Theme > Edit code:

BSSCommerceB2B_0-1726968696250.png

Step 2: Search for the file base.css. And add this code snippet to the end of the file.

 

 

slider-component.slider-mobile-gutter.slider-component-desktop.scroll-trigger.animate--slide-in {
    margin-bottom: -30px !important;
}

 

IN this step, you can change the value of margin-bottom as you want to decrease the space. 

In my example, I choose -30px

Step 3: Save and reload home page.

=>> The result: 

BSSCommerceB2B_2-1726968707178.png

 

I hope thse instructions will help you. If they are helpful, please give us likes and mark as the solution.

Have a nice day sir! 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

BSS-TekLabs
Shopify Partner
2350 701 826

This is an accepted solution.

- Here is the solution for you @lukafernada 
- Please follow these steps:
1. Go to Online Store --> Theme --> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head> and press 'Save' to save it

<style>
@media only screen and (max-width: 600px) {
section#shopify-section-template--20584607220061__d3b96308-edf5-416e-8b72-5e268477c7ba {
    margin-top: -40px !important;
}
}
</style>

- Here is the result you will achieve:

BSSTekLabs_0-1726974607448.png

 

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

PageFly-Richard
Shopify Partner
4661 1068 1725

This is Richard from PageFly - Shopify Page Builder App

 

Hi @lukafernada  Please add code here to fix it:

Step 1: Online Stores > Themes > Edit code

Step 2: Choose file theme.liquid
Step 3: Add code above the tag </body>

 

<style>
slider-component.slider-mobile-gutter.slider-component-desktop {
    margin-bottom: -24px !important;
}
</style>

 

Hope my solution will help you resolve the issue.

 

Best regards,

Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.