All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi! I'm trying to figure out how to remove a gap on my websites home page, in the header above the slideshow section. This is only a problem on mobile view, and it's also not a padding issue. From what I can tell, when looking at the "mobile menu" section, it's dead space left over from the navigation menu select. When I deselect this option, it disappears and leaves a white space in its place. I'd like for the white space to be gone when the menu disappears as well. I have no use for this style menu on mobile because I already have the hamburger style one on the left side.
I'm using the broadcast "clean" theme, which was uploaded not installed - I had a graphic designer set up the site but I'm no longer working with them, plus they did not know how to fix the issue lol.
I noticed the theme files were modified (code was either added or removed) but I don't know much about that to change anything myself! Any help would be appreciated! My website is www.sorellaofficial.com
I've had a few people try to give me some solutions on another post but none worked and they cut the banner 3/4 its size...I'd like to keep everything as it is, just remove the white part! Thanks
Solved! Go to the solution
This is an accepted solution.
Hello @sorellallc ,
Follow these steps:
1. Go to Online Store -> Theme -> Edit code
2. Open your theme.css file and paste the following code at the bottom:
.header__backfill {
display: none;
}
div#shopify-section-template--20982533194031__slideshow {
padding-top: 11%;
}
Regards
Guleria
Hi @sorellallc 👋 Avoid duplicate posts.
From this duplicate post https://community.shopify.com/c/shopify-discussions/broadcast-theme-how-to-remove-gap-between-header...
If free code help that's already been given doesn't fix things hire someone to actually fix it.
Basic troubleshooting
Otherwise it's probably from theme customizations or apps.
Merchants that need theme repair services can contact me.
Contact info in forum signature below ⬇ ⬇ ⬇.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
Hello,
I took a look, and the issue on mobile is caused by this line in your header.liquid (or possibly another header-related file):
<div class="header__backfill" data-header-backfill=""></div>
This element is essentially empty and doesn't serve a functional purpose — but it still takes up vertical space, which is why you’re seeing that white gap above your slideshow.
Add this to your theme’s CSS file (likely base.css or theme.css):
.header__backfill {
display: none;
}
✔️ Tested, cleanly remove the space without affecting anything else on the homepage or layout.
Cheers!
Edit: As @PaulNewton mentionned about the duplicate post, https://community.shopify.com/c/shopify-discussions/broadcast-theme-how-to-remove-gap-between-header...:
=> The solutions provided in the initial post also work. Not sure why the duplication.
This is an accepted solution.
Hello @sorellallc ,
Follow these steps:
1. Go to Online Store -> Theme -> Edit code
2. Open your theme.css file and paste the following code at the bottom:
.header__backfill {
display: none;
}
div#shopify-section-template--20982533194031__slideshow {
padding-top: 11%;
}
Regards
Guleria
Thank you so much! This solution worked the best for me.
Please go to your store admin > Sales channels > Online Store > Themes > Customize > Theme settings > in Custom CSS, add this code and then click Save button
@media (max-width: 749px) {
.header__backfill {
height: auto !important;
}
- Helpful? Like & Accept solution!
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
I do not quit follow the logic of the theme code -- it could be that your header height is modified with some custom CSS, but theme code is not aware of this and assigns wrong size to CSS variables...
So yes, you can hide the header_backfill element or set its height to 0, but it is used for sticky header functionality, which would not work if you do this.
My suggestion is to rather use this code -- you can put it into "Theme settings"=> "Custom CSS"
.js .header__backfill {
height: var(--header-height);
}
Theme has JS code which updates this variable to match header height for different screen widths.