Reduce White Space Between Elements On Homepage (Brooklyn Theme)

Reduce White Space Between Elements On Homepage (Brooklyn Theme)

StoreHelpNeeded
Explorer
54 1 10

Hello there!

Could anybody please help me with the code required to reduce the white space between sections/elements on the homepage of my Brooklyn theme? I want the white space between all sections shrunk by half.

 

Thank you for your support!

Replies 2 (2)

Litos
Globetrotter
688 169 150

Hi @StoreHelpNeeded,

Go to Assets > theme.scss.liquid and paste this at the bottom of the file:

/*================ code for desktop ================*/
.index-sections .shopify-section {
	margin-top: 45px !important; 
}
@media screen and (max-width: 768px) {
	/*================ code for mobile ================*/
    .index-sections .shopify-section {
		margin-top: 25px !important; 
	} 
}

Hope it helps!

Litos - Shopify Development Service Provider
Need to develop or customize your Shopify store, feel free to contact us here.

PageFly-Noah
Shopify Partner
1317 233 281

Hi @StoreHelpNeeded 

 

This is Noah from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

<style>
.index-sections .shopify-section {
margin-top: 15px;
}
</style>

This is reduced half of the current spacing now

 

Hope this can help you solve the issue 

 

Best regards,

Noah | PageFly

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


PageFly - #1 Page Builder for Shopify merchants.


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