Hello, can someone help me fix our search bar? When you click on the icon you’ll see it ends up behind our logo and I’m not sure how that happened or how to remedy it. Thank you. Website is hilltopgeneral.com.
Topic summary
A Shopify store owner reports their search bar appearing behind the logo when clicked.
Root Cause: A z-index CSS issue where the search modal lacks proper stacking priority over header elements.
Proposed Solution:
- Add
z-index: 1000;to the.search-modal.modal__content.gradientclass - Set
.modal-overlaytoz-index: 999; - Verify the header/logo doesn’t have a conflicting higher z-index value
Current Status: The store owner accepted the solution but requested additional guidance on navigating to the search modal’s CSS file within Shopify’s Edit Code section. The discussion remains open pending implementation instructions.
Hey @HIlltopGeneral ,
Hope you’re doing fantastic!
This appears to be a z-index issue with your search modal. The search overlay is appearing behind your logo because it needs a higher z-index value to ensure it stacks correctly above other elements.
Here’s how you can fix this:
- Find your search modal’s CSS (the element with class search-modal modal__content gradient)
- Add or update the z-index property. You’ll want to use a relatively high value to ensure it stays above header elements:
.search-modal.modal__content.gradient {
z-index: 1000;
}
If you’re still seeing issues, you might also need to check:
- The modal overlay class (modal-overlay) should also have a high z-index, slightly lower than the modal itself:
.modal-overlay {
z-index: 999;
}
- Make sure your header/logo container doesn’t have a higher z-index value that’s causing it to stack above the search modal.
Hope that helps!
If you have any more questions for me, feel free to reach out. If you want us to do this for you, just DM your collaborator code.
Cheers!
Shreya | Revize
Thank you for the quick response! So basically I need to just change that number after z-index. Do you have a suggested number, or just anything over 1000?
1000 would do ![]()
Once I go into Edit Code, can you tell me how to navigate to the search modal’s css?