What's your biggest current challenge? Have your say in Community Polls along the right column.

Center Navigation Menu and Expand Search Bar to Full Width

Solved

Center Navigation Menu and Expand Search Bar to Full Width

atomicshinji
Excursionist
15 1 1

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
Trailblazer
435 38 55

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

Crafting exceptional online experiences with innovative design and technology.

Try Big Bulk Discount To Boost Your Store Sales with Volume/Tier Discount

View solution in original post

Replies 14 (14)

steve_michael2
Trailblazer
435 38 55

Hello! 

 

Please share "Store URL". 

 

Thanks.

Crafting exceptional online experiences with innovative design and technology.

Try Big Bulk Discount To Boost Your Store Sales with Volume/Tier Discount
atomicshinji
Excursionist
15 1 1

Hi Steve!

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

steve_michael2
Trailblazer
435 38 55

Hi

This URL need password for further process

Crafting exceptional online experiences with innovative design and technology.

Try Big Bulk Discount To Boost Your Store Sales with Volume/Tier Discount
atomicshinji
Excursionist
15 1 1

Please use below password:
eashal

steve_michael2
Trailblazer
435 38 55

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

Crafting exceptional online experiences with innovative design and technology.

Try Big Bulk Discount To Boost Your Store Sales with Volume/Tier Discount
atomicshinji
Excursionist
15 1 1

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
15 1 1

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
Trailblazer
435 38 55

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

Crafting exceptional online experiences with innovative design and technology.

Try Big Bulk Discount To Boost Your Store Sales with Volume/Tier Discount
atomicshinji
Excursionist
15 1 1

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

atomicshinji
Excursionist
15 1 1

Hi Shekinah!

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

websensepro
Shopify Partner
1290 145 166

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 | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here

Free Shopify Beginner Tutorial
atomicshinji
Excursionist
15 1 1

It didn't work—did I miss something?

atomicshinji_0-1731935087873.png

 



Screenshot_1.png

websensepro
Shopify Partner
1290 145 166

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 | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel or buy us a Cofee here

Free Shopify Beginner Tutorial
atomicshinji
Excursionist
15 1 1

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