Navigation menu is not centered in the middle

Solved

Navigation menu is not centered in the middle

tsswnkls
Tourist
5 1 3

I applied the code below to center my navigation menu. As you can see, it’s somewhat successful, but I just can’t get the navigation menu perfectly centered. Does anyone have a solution?

 

@media screen and (min-width: 500px){

.header--middle-left {

grid-template-columns: unset !important;

}

} .header__inline-menu {

display: flex; justify-content: center;

}

 

 

Screenshot 2024-11-28 132920.png

Accepted Solution (1)

tsswnkls
Tourist
5 1 3

This is an accepted solution.

The issue has been resolved! I adjusted the code to the following, and it works perfectly.

 

@media screen and (min-width: 500px){
.header--middle-left {
grid-template-columns: unset !important;
}
}
.header__inline-menu {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
}

View solution in original post

Replies 3 (3)

Moeed
Shopify Partner
7511 2029 2495

Hey @tsswnkls 

 

Share your store URL and password if enabled.

 

Best Regards,

Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


tsswnkls
Tourist
5 1 3

This is an accepted solution.

The issue has been resolved! I adjusted the code to the following, and it works perfectly.

 

@media screen and (min-width: 500px){
.header--middle-left {
grid-template-columns: unset !important;
}
}
.header__inline-menu {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
}

solverStaff
Shopify Partner
414 41 71

Okay great

 Shopify Expert | Theme Developer | Quick Fixes


 Need Shopify help? Let’s chat! WhatsApp


 Portfolio: SolverStaff - Shopify Expert