Eliminate padding and margins in Spark Theme

Hello,

I just purchased the Spark theme (set to Chic) and I want to eliminate the padding between all of my sections on the home page. I tried a few solutions but can’t seem to find success.

https://garagecollective.myshopify.com/

Thank you,

DB

1 Like

Hi @Dbarry ,

You can follow the instructions below

  1. Go to Admin > Online store > Themes > Actions > Edit code
  2. Go to Asset folder, and open the theme.css file
  3. Add the code below.

NOTE: You can adjust the px

.template-index section:not(:last-child) {
    margin-bottom: -50px;
}

@Dbarry

oh sorry for that issue can you try this code

  1. Go to Online Store->Theme->Edit code
  2. Asset->/theme.css ->paste below code at the bottom of the file.
@media (min-width: 45em) {
.section.section--small {
    margin-bottom: 0 !important;
}
.section {
    margin: 100px 0px;
}
.section.section--contrast {
    padding: 50px 0px;
}
}

Hi @Dbarry ,

You want to remove all, it will show like this?

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

.template-index section:not(:last-child) {
    margin-bottom: 0 !important;
}
.template-index .section {
    margin: 0 !important;
}

Hope it helps!

This looks like the best bet but.. When I removed it, saved without code then went back and added it again, I can’t get the code to work.

Also is there a way for this just to apply to desktop and not mobile?

Thanks,

DB

Hi @Dbarry ,

Go to Assets > theme.css and remove code here:

Then add the following code:

@media (min-width: 45em){
	.template-index section:not(:last-child) {
		margin-bottom: 0 !important;
	}
	.template-index .section {
		margin: 0 !important;
	}
}

Hope it helps!

This worked thank you!

1 Like