We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How can I center the header menu in Dawn theme on desktop view?

Solved

How can I center the header menu in Dawn theme on desktop view?

jecbon
Explorer
60 0 23

hello, i would like to center the header menu to have it in the center of the page. only visible on computer and the logo can stay on the left . 

 

 

 

DAWN THEME.

Accepted Solutions (2)

Zworthkey
Shopify Partner
5581 641 1583

This is an accepted solution.

hii, @jecbon 
Paste this code on top of the base.css file.

@media screen and (min-width: 990px){
nav.header__inline-menu {
    position: relative !important;
    left: 360px !important;
}
}

Thank You.

View solution in original post

Zworthkey
Shopify Partner
5581 641 1583

This is an accepted solution.

@jecbonremove the previous code which I have given you for center navigation and paste this code on top of the base.css file.

@media screen and (min-width: 990px){
nav.header__inline-menu {
    position: relative!important;
    left: 420px !important;
}
}

Thank You.

View solution in original post

Replies 18 (18)

dmwwebartisan
Shopify Partner
12384 2560 3749

@jecbon 

please try this code 1. Go to Online Store->Theme->Edit code 2. Asset->/base.css ->paste below code at the bottom of the file. 

@media screen and (min-width: 990px){
.header--middle-left .header__inline-menu { margin: 0 auto !important;}
}

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
PageFly App to customize your pages | The most powerful Shopify page builder app
jecbon
Explorer
60 0 23

the solution should be standard across dawn theme im not sure if i need to share link . 

dmwwebartisan
Shopify Partner
12384 2560 3749

@jecbon 

please try this code 1. Go to Online Store->Theme->Edit code 2. Asset->/base.css ->paste below code at the bottom of the file. 

@media screen and (min-width: 990px){
.header--middle-left .header__inline-menu { margin: 0 auto !important;}
}
If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
PageFly App to customize your pages | The most powerful Shopify page builder app
jecbon
Explorer
60 0 23

doesnt work sir. 

Zworthkey
Shopify Partner
5581 641 1583

This is an accepted solution.

hii, @jecbon 
Paste this code on top of the base.css file.

@media screen and (min-width: 990px){
nav.header__inline-menu {
    position: relative !important;
    left: 360px !important;
}
}

Thank You.

jecbon
Explorer
60 0 23

Thank you Zworth. 

Zworthkey
Shopify Partner
5581 641 1583

@jecbon 
Thanks for your Question, kindly like our solution i helpful.

jecbon
Explorer
60 0 23

????

Zworthkey
Shopify Partner
5581 641 1583

This is an accepted solution.

@jecbonremove the previous code which I have given you for center navigation and paste this code on top of the base.css file.

@media screen and (min-width: 990px){
nav.header__inline-menu {
    position: relative!important;
    left: 420px !important;
}
}

Thank You.

jecbon
Explorer
60 0 23

Hi again, same issue it is not centering even when im full screen on desktop. previously it was centered ok when i had the screen half size but when i go full screen it becomes off centered. Now with the new solution, its off centered on both half window screen and full screen. 

p1simgear
Excursionist
56 0 8

Hi there I have the same issue with this code - it doesnt auto center when changing the screen size:

@media screen and (min-width: 990px){
nav.header__inline-menu {
position: relative!important;
left: 420px !important;
}
}

 

Is there a way to replace the 420px element with an auto center function?

 

thanks!

Hiltonfrost
New Member
4 0 0

Has anyone come up with a solution for this? I am needing my menu centered no matter the screen size

dmwwebartisan
Shopify Partner
12384 2560 3749

@Hiltonfrost 

My pleasure to help you.
Welcome to the Shopify community!
Please share your store URL!
I will check out the issue and provide the correct solution to you!

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
PageFly App to customize your pages | The most powerful Shopify page builder app
p1simgear
Excursionist
56 0 8

Thankd @dmwwebartisan , this is same issue for me. My details:

 

p1simgear.com.au

pw:  P1test%

 

thanks!

dmwwebartisan
Shopify Partner
12384 2560 3749

@p1simgear 

Please add the following CSS code to your assets/base.css bottom of the file.

 

@media (min-width: 990px) {
  .header .header__inline-menu {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .header .list-menu--inline {
    display: flex;
    justify-content: center;
  }
}

 

Thanks!

If helpful then please Like and Accept Solution | Email: dmw.webartisan@gmail.com |  Instagram: @dmw.webartisan
PageFly App to customize your pages | The most powerful Shopify page builder app
p1simgear
Excursionist
56 0 8

Awesome, worked perfectly. thanks!

jecbon
Explorer
60 0 23

Hello, this does not center the header menu on the desktop. it is skwed to the left. 

greencloudnine
Visitor
2 0 0

It also worked for me, and actually i just added it to the custom css section in the theme. Thx!