Shopify themes, liquid, logos, and UX
Hey,
I'm trying to find a code to remove the search bar from the header on my supply theme, so far I've used the below code for my web version but i can't find a version for it to remove it from the mobile version
header.site-header__search-toggle {
display: none;
}
Solved! Go to the solution
This is an accepted solution.
Use the following code for the mobile.
@media screen and (max-width: 768px) {
.nav-bar .search-bar { display: none; }
}
Thanks!
Please add the following code at the bottom of your assets/ file.
@media screen and (max-width: 768px){
header.site-header__search-toggle { display: none; }
}
OR you can use it this way also.
@media screen and (max-width: 768px) {
.site-header .search-bar { display: none; }
}
Hope this works.
Thanks!
the code comes up as an error, am i supposed to put it at the bottom of my theme.scss.liquid file?
Really sorry, try this.
@media screen and (max-width: 768px) {
header.site-header__search-toggle { display: none; }
}
I corrected the above codes also.
Thanks!
the code doesn't error anymore however the search bar is still appearing :S
Can you please share your url?
chi-herbal.myshopify.com
This is an accepted solution.
Use the following code for the mobile.
@media screen and (max-width: 768px) {
.nav-bar .search-bar { display: none; }
}
Thanks!
Beautiful ty
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024