Center Navigation Menu and Expand Search Bar to Full Width

Solved

Center Navigation Menu and Expand Search Bar to Full Width

atomicshinji
Excursionist
27 1 4

How to make search bar full width and center the menu? (dawn theme). I would like to center the navigation menu and make the search bar full-width. Please refer to the attached image for reference.

 

menu.png

Accepted Solution (1)
steve_michael2
Navigator
445 38 61

This is an accepted solution.

@media screen and (min-width: 990px) {
    .header:not(.header--middle-left,.header--middle-center) .header__inline-menu {
        margin-top: 1.05rem;
        display: flex !important;
        justify-content: center;
    }
}

) Go to Online Store
2) Edit Code
3) Find base.css file
4) Add the following code in the bottom

View solution in original post

Replies 14 (14)

steve_michael2
Navigator
445 38 61

Hello! 

 

Please share "Store URL". 

 

Thanks.

atomicshinji
Excursionist
27 1 4

Hi Steve!

Please see below URL:
https://1bc201-61.myshopify.com/

steve_michael2
Navigator
445 38 61

Hi

This URL need password for further process

atomicshinji
Excursionist
27 1 4

Please use below password:
eashal

steve_michael2
Navigator
445 38 61

1) Go to Online Store
2) Edit Code
3) Find base.css file
4) Add the following code in the bottom

.search__input.field__input {
    padding-right: 9.8rem;
    width: 100vh;
}

// Center align menu bar //

.header__inline-menu {
        margin-top: 1.05rem;
        display: flex;
        justify-content: center;
    }

 Thanks

atomicshinji
Excursionist
27 1 4

Hi there!

header search bar is now full width but the dropdown seems off.
Also, inline menu code didn't work.

atomicshinji_0-1731935325821.pngatomicshinji_1-1731935339730.pngatomicshinji_2-1731935356354.png

 



atomicshinji
Excursionist
27 1 4

I already fixed the dropdown issue by adding the following code:
predictive-search[open] .predictive-search {
position: absolute;
min-width: 768px;
left: unset;
transform: translateX(0%);

The last issue is with the menu—how can I center it?
Appreciate your help!


steve_michael2
Navigator
445 38 61

This is an accepted solution.

@media screen and (min-width: 990px) {
    .header:not(.header--middle-left,.header--middle-center) .header__inline-menu {
        margin-top: 1.05rem;
        display: flex !important;
        justify-content: center;
    }
}

) Go to Online Store
2) Edit Code
3) Find base.css file
4) Add the following code in the bottom

atomicshinji
Excursionist
27 1 4

This works!
I appreciate your help! Thank you so much!

atomicshinji
Excursionist
27 1 4

Hi Shekinah!

I look forward to your feedback and suggestions on how to improve it.

websensepro
Shopify Partner
1914 229 274

Hi
1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head>

 

.list-menu--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

 

Save Changes.

 

If my reply is helpful, kindly click like and mark it as an accepted solution.

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP
atomicshinji
Excursionist
27 1 4

It didn't work—did I miss something?

atomicshinji_0-1731935087873.png

 



Screenshot_1.png

websensepro
Shopify Partner
1914 229 274

Please add this  code at the bottom ( base.css file )
I hope this work for you

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP
atomicshinji
Excursionist
27 1 4

This works as well!
I appreciate your help! Thank you so much!