Hi @Shopify_77
I am using “custom content section” to create a BUY NOW button to place it in the home page.
But I realize that the “custom contect section” occupied big space, which make the “button” was placed far from the upper section. so I was trying to edit the code to decrease the height. Please let me know how, thank you. my theme is Debut.
John
1 Like
Hello, @John-Yixiaobao
Welcome to the Shopify Community.
I read your problem and it seems that I need to analyze your website to provide solution here.
Would you please share your website URL and if your website is password protected then also provide password.
Hello There,
Please share your store URL and password.
So that I will check and let you know the exact solution here.
@John-Yixiaobao
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Hi,
LIke the others have said in the forum, it’s a bit difficult to diagnose without seeing the website.
Having said that, if you can see the section id for this block, that could be something like this:
More HTML code including the button
You could then adjust the padding of the block adding this code to your CSS file (note that in your case the section id will be different)
#shopify-section-161916007858df887d {
padding-top: 20px;
padding-bottom: 20px;
}
Hope this helps or at least puts you in the right direction.
Hi Hardik,
thank you.
https://yrhandlock.com/
it’s our website, thank you
sorry, my bad, forget to list the url, please help to look
https://yrhandlock.com/
Hello There,
In your Shopify Admin go to online store > themes > actions > edit code
Find Asset >theme.css and paste this at the bottom of the file:
div#shopify-section-1620876630cd872b4c {
padding-top: 0;
height: auto;
}
div#shopify-section-1620876630cd872b4c center a.btn.hero__btn {
margin-top: 0;
}
1 Like
@John-Yixiaobao
Hello,
Welcome to the shopify Community.
Please Go to Online Store → Themes → Edit code → Assets → theme.scss.liquid and paste this code at the end of this file.
#shopify-section-1620876630cd872b4c {
padding-top: 0px;
}
#shopify-section-1620876630cd872b4c .custom__item {
margin-bottom: 0px;
}
1 Like
Solved. Thank you Pallavi
1 Like
Thank you Hardik, it was solved. Thank you for your code. You are all Pros
1 Like
Kindly feel free to get back to me if you need any further assistance Thanks!
here is the final layout, I like it
2 Likes
guyv
February 22, 2022, 8:46am
15
@ZestardTech and @Hardik29418 please can you assist me?
I want to do the same thing but I can’t make it work with the code you’ve provided.
My website is www.electricrideco.com
I have a custom html section on my homepage containing icons and I would like to change the height of the section.
I would like the section to be changed to approx. the height of the red box in the screenshot below:
Thanks in advance for your help.
alexfc
February 22, 2022, 11:54am
16
@guyv
In line 5501 of your theme’s file assets/theme.scss you will find this code:
.section-block--padding {
padding: 30px; }
You can change it to something like this:
.section-block--padding {
padding: 10px 30px;
}
1 Like
guyv
February 22, 2022, 12:43pm
17
@alexfc
Thanks for your input. This works, however it changes the padding of all my custom html sections and I only want to change this one section.
The section that I want to change is “shopify-section-1641540086e4ae1f73”.
Please can you assist with code for changing only this one section?
alexfc
February 22, 2022, 12:55pm
18
@guyv
Sure, you can add an extra style targeted to that specific section:
.section-block--padding {
padding: 30px; }
#shopify-section-1641540086e4ae1f73 .section-block--padding {
padding: 10px 30px;
}
Hope this helps.
alexfc
February 22, 2022, 2:13pm
19
@guyv
You can add an extra line to the stylesheet to target that block when it’s inside the section you’ve just mentioned:
From this
.section-block--padding {
padding: 30px;
}
To this:
.section-block--padding {
padding: 30px;
}
#shopify-section-1641540086e4ae1f73 .section-block--padding {
padding: 10px 30px;
}
Hope this helps.
1 Like
guyv
February 22, 2022, 4:21pm
20
@alexfc
Perfect! Thanks a lot for your help!