I want to remove the search icon on mobile

Topic summary

A user seeks to hide the search icon from their mobile header on their Shopify store (five-pocket.com).

Solution Process:

  • Initial CSS code provided targeted .header__icon--search with display: none and visibility: hidden within a @media screen and (max-width: 749px) query
  • First attempt failed due to a syntax error (dash between “max-width”)
  • Corrected code was provided but still didn’t resolve the issue

Working Solution:
Add the following CSS to the bottom of base.css/style.css/theme.css file:

@media only screen and (max-width: 749px) {
  .header__icon.header__icon--search {
    display: none !important;
  }
}

Key differences: Uses more specific selector (.header__icon.header__icon--search), includes !important flag, and proper media query syntax.

Status: Resolved - user confirmed the final solution worked.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

Hi,

I want to remove the search icon on mobile on my header.

Here’s the link of my website : https://www.five-pocket.com/

Thanks.

1 Like

@imazele - please add this css to the very end of your base.css file and check,
Shopify Admin → Online Store ->Theme → Edit code → base.css

@media screen and (maxwidth:749px){
.header__icon--search {display: none;    visibility: hidden;}
}

Did not work

@imazele - sorry, - was remaining between max-width , make it like add below one

@media screen and (max-width:749px){
.header__icon--search {display: none;    visibility: hidden;}
}
1 Like

Hi @imazele

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
@media only screen and (max-width:749px){
summary.header__icon.header__icon--search {
    display: none !important;
}
}

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

Thank you bro!