How do I rearrange the header icons in dawn theme for mobile view keeping everything aligned

Solved

How do I rearrange the header icons in dawn theme for mobile view keeping everything aligned

Lodhas
Visitor
1 0 1

I am unable to rearrange the header icons in dawn theme for mobile view keeping everything aligned in a single line in the order menu drawer, search, logo, customer icon, cart. I did try to add the search icon right after the menu drawer but it hides the search icon Screenshot 2025-04-26 at 5.07.18 PM.pngfrom the desktop view and the icons are not in one line.

Accepted Solution (1)
devcoders
Shopify Partner
1448 172 450

This is an accepted solution.

Hello @Lodhas 

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > base.css and paste this at the bottom of the file:

@media only screen and (max-width: 768px) {
.header {
position: relative;
}
.header__search {
position: absolute;
left: 18%;
top: 50%;
transform: translateY(-50%);
}
.header__heading {
margin-left: 10px; 
}
details[open] .header__search {
position: static!important;
top: auto;
transform: none;
}
.header__search:has(details[open]) {
position: static;
left: auto;
top: auto;
transform: none;
}
}

 

devcoders_0-1745671794590.png

 



 

Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com
WhatsApp No: +91 8516919310 If my assistance was helpful, please consider liking and accepting the solution. Thank you!

View solution in original post

Replies 2 (2)

devcoders
Shopify Partner
1448 172 450

Hello @Lodhas 
Welcome to the Shopify Community! Kindly share your store URL and password (if it is password-protected), so that I can review it and provide you with an accurate solution.

Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com
WhatsApp No: +91 8516919310 If my assistance was helpful, please consider liking and accepting the solution. Thank you!
devcoders
Shopify Partner
1448 172 450

This is an accepted solution.

Hello @Lodhas 

1. In your Shopify Admin go to online store > themes > actions > edit code
2. Find Asset > base.css and paste this at the bottom of the file:

@media only screen and (max-width: 768px) {
.header {
position: relative;
}
.header__search {
position: absolute;
left: 18%;
top: 50%;
transform: translateY(-50%);
}
.header__heading {
margin-left: 10px; 
}
details[open] .header__search {
position: static!important;
top: auto;
transform: none;
}
.header__search:has(details[open]) {
position: static;
left: auto;
top: auto;
transform: none;
}
}

 

devcoders_0-1745671794590.png

 



 

Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com
WhatsApp No: +91 8516919310 If my assistance was helpful, please consider liking and accepting the solution. Thank you!