Does anyone know how to remove this small white bar only in mobile view underneath my header in coding? I’ve tried everything to remove it and I can’t figure it out. Thanks!
Code I’ve tried:
-
.site-header {
border: 0 !important;
}
-
theme-header#header {
border: none;
}
-
.media > *:not(.zoom):not(.deferred-media__poster-button),
.media model-viewer {
height: calc(100% + 2px);
bottom: 0;
}
Here is the url: 974c96-74.myshopify.com
1 Like
Hey! That thin white line issue on mobile is usually caused by either:
- A default border or margin from the header or announcement bar
- A background mismatch between stacked elements on mobile view
- Padding/margin from a wrapper div that only appears in mobile layout
From what you described and tried, you’re close — but here’s one more approach to test:
css
CopyEdit
@media only screen and (max-width: 768px) {
.site-header {
border: none !important;
margin: 0 !important;
padding: 0 !important;
background: #000 !important; /* or match your header bg */
}
header[role="banner"] {
border: none !important;
background: #000 !important;
}
}
Also inspect the body or html background color on mobile — sometimes a slight gap is from the parent container showing through.
If it’s still giving trouble, I’d be happy to take a quick look and fix it — I help Shopify store owners clean up layout issues like this regularly.
Let me know if you want me to jump in and patch it.
1 Like
Thanks for your reply. The code didn’t seem to work. I inspected it and didn’t find anything unusual. Could you take a quick look? The line only seems to appear in the mobile M and mobile L views.
Thanks!
Hi @William021
Try with this, not sure if it will work on real device but in browser I could replicate it
@media screen and (max-width: 999px) {
.header__logo {
max-height: 45px;
}
}
So currently calculated height on mobile is like 49.33px but if set limit to 48 or below white line disappear. On 50px it does show. IT could also be connected with
–announcement-bar-height and --header-height variables but just try code.
1 Like
Hello, how are you doing? there are many to solve this errors, do you have time to discuss how this can actually be solved?