How do I hide search icon from mobile version? (Dawn)

Solved

How do I hide search icon from mobile version? (Dawn)

mesetan
Tourist
10 0 3

I want to keep displaying the search icon on desktop but remove it for the mobile version as it makes my logo look off-center, is there a way for me to do this on dawn? Any help would be appreciated!

Accepted Solution (1)

PageFly-Victor
Shopify Partner
7865 1786 3131

This is an accepted solution.

Hi @mesetan 

 

This is Victor from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

<style>
@media screen and (max-width: 767px){
.header__search {
display: none; 
}
}
</style>

 

Hope this can help you solve the issue 

 

Best regards,

Victor | PageFly

View solution in original post

Replies 3 (3)

PageFly-Victor
Shopify Partner
7865 1786 3131

This is an accepted solution.

Hi @mesetan 

 

This is Victor from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

<style>
@media screen and (max-width: 767px){
.header__search {
display: none; 
}
}
</style>

 

Hope this can help you solve the issue 

 

Best regards,

Victor | PageFly

GoombaGrows
Explorer
45 2 9

This may be 2 years old but still works and helped me! Thank you 🙂

GemPages
Shopify Partner
5625 1262 1279

Hi @mesetan 

I would like to give you a solution.

You can add code to remove the search icon on only mobile by following these steps:

1. Go to Online Store -> Theme -> Edit code. https://prnt.sc/js2u9lX4TESb

2. Open your base.css in the Assets folder.
3. Paste the below code at the end of the file.

@media screen and (max-width: 767px){
  .header .header__search {
     display: none !important; 
  }
}

GemPages_0-1679447599828.png

 

 

4. Save file, then double-check.

 

Best regards,
GemPages Support Team

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center