Site logo

Archived topic

Hide search icon on mobile and tablet

3 replies · Started by Renske on February 8, 2022

Viewing posts 1–4 of 4

Hi there,

How do I hide the search icon on mobile and tablet? I tried some CSS, but unfortunately it's still there.

Hi Renske,

Can you provide the CSS you've added? Perhaps we can make it work w/ some modification.

Alternatively, you can try this:

@media (max-width:1024px){
    nav#site-navigation .menu-bar-items span.menu-bar-item.search-item {
        display:none;
    }
}

But this may have some weird grey area w/ small desktops and tablets as these 2 share the same viewport breakpoint.

You can modify the max-width's 1024px value to a lower one like 992px or lower if you wish to fine tune it.

I see. Let's try using selectors w/ more specificity.

For mobile-header enabled sites, you can try this:

    nav#mobile-header .menu-bar-items span.menu-bar-item.search-item {
        display:none;
    }
This archived topic is closed to new replies.