Theme: Dawn
Topic summary
A user is experiencing issues with the search icon placement in their Shopify store’s mobile view. Multiple solutions providers offered CSS code fixes to reposition the search icon:
Proposed Solutions:
- Adding custom CSS to
theme.liquidfile before the</body>tag - Inserting CSS in
base.cssfile targeting mobile breakpoints (max-width: 767px/989px) - Adjusting positioning properties (top, padding, margin) for header search elements
Current Status:
The issue remains unresolved. After implementing initial suggestions, the user reported the search bar is “still all wrong.” One responder acknowledged the search input text is missing and recommended hiring a developer for a complete fix.
Technical Approach:
All solutions involve adding CSS media queries to adjust .header__search, .modal__content, and related search elements specifically for mobile viewports, using absolute positioning and padding adjustments.
Hi @TBS2023
Check this one.
From your Shopify admin dashboard, click on “Online Store” and then “Themes”
Find the theme that you want to edit and click on “Actions” and then “Edit code”.
In the “theme. Liquid” file. Find the tag and paste the code below before the tag.
And Save.
Result:
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
Hi @TBS2023
This is Amelia from PageFly - Landing Page Builder App
You can try this code by following these steps:
Step 1: Go to Online Store->Theme->Edit code.
Step 2: Search file base.css
Step 3: Paste the below code at bottom of the file → Save
@media (max-width: 767px){
.header__search summary.header__icon.header__icon–search.header__icon–summary.link.focus-inset.modal__toggle {
top: 0 !important;
}
a.header__heading-link.link.link–text.focus-inset {
margin: 0;
padding-top: 0;
}}
Hope that my solution works for you.
Best regards,
Amelia | PageFly
@TBS2023 ,
Step 1. Go to Admin → Online store → Theme > Edit code
Step 2. Find the file theme.liquid.
Step 3. Add this code above
Result:
Hi @TBS2023 ,
- Go to Online Store → Theme → Edit code.
- Open your theme.liquid file
- In theme.liquid, paste the below code before
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
Im not sure what design your aiming here. The search bar is not align before cause there is a code that was added so I just take it out. I try to fix your search bar on the mobile. But the input text are missing.
This is i can fix from here, better to get a developer to fix.
please, Add on the base.css file. thanks!
@media only screen and (max-width: 989px){
.modal__content {
position: absolute;
top: 0;
left: unset;
right: 100%;
}
.search__input.field__input {
padding: 0 10rem;
}
}
And Save.
Result:
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!




