Centering Menu and Logo and aligning cart

Solved

Centering Menu and Logo and aligning cart

Local_q
Visitor
1 0 1

Hi! I have the Local Theme and I have been trying to center the Logo and the menu but haven't had luck. I have tried with all the solutions already offered in this forum but none seemed to work with my theme.

 

My goal:     
|                     [logo]                        |

|                    [menu]           [cart]  |

 

What it currently looks like:

| [logo]                                  [cart]|

| [menu]                                          |

 

I also posted a Screen shot of what it currently looks like.

 

Thanks!

 

Accepted Solution (1)

tim
Shopify Partner
4727 578 1706

This is an accepted solution.

This code (can go to "Theme settings"=> "Custom CSS")

@media (min-width:1024px) {
  .header-actions--buttons {
    position: absolute;
    right: 0;
    max-width: 320px;
  }
  
  div#logo {
    padding: 0 320px;
    justify-content: center;
  }
  
  .header__top {
    display: flex;
    justify-content: center;
  }
  
  .site-nav.style--classic {
    justify-content: center;
  }
}

 

Will do this:

Screenshot 2025-06-05 at 7.05.28 PM.png

 

Moving Account/Cart buttons to the  menu line can not be done nicely with CSS only; also, as seen in the screenshot -- they would not fit, there is much more space for them in the logo line.

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 4 (4)

Betterave-Nina
Tourist
62 7 8

Hi @Local_q. Welcome to Shopify Community!

 

It wouldn't be possible to style this with just CSS as the logo and buttons are located within one div and the menu is rendered with a sibling div. You can't change the DOM order with CSS.

 

This change would require editing your header.liquid file, most likely, or another corresponding .liquid file.

➡➡   Easy Embed Code   ⬅⬅ insert CSS/JS/HTML/Liquid code into any store page



Speed Booster App - Improve your store speed in 3 clicks
Need professional help with your Shopify store? DM me, let's talk!
Geeky notes

Dan-From-Ryviu
Shopify Partner
11998 2347 2523

You can add this code to Custom CSS in of header to make your header like this 

.site-nav.style--classic {
    justify-content: center;
}

Screenshot 2025-06-05 at 10.19.29.png

If you still want to make header look like your request then we will need to access theme and edit code to do that. 

 

- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

AnneLuo
Shopify Partner
1364 237 279

Hi, @Local_q 

Can you please share the store URL so I can better support you?

If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to Email Me   

Buy Me A Coffee

tim
Shopify Partner
4727 578 1706

This is an accepted solution.

This code (can go to "Theme settings"=> "Custom CSS")

@media (min-width:1024px) {
  .header-actions--buttons {
    position: absolute;
    right: 0;
    max-width: 320px;
  }
  
  div#logo {
    padding: 0 320px;
    justify-content: center;
  }
  
  .header__top {
    display: flex;
    justify-content: center;
  }
  
  .site-nav.style--classic {
    justify-content: center;
  }
}

 

Will do this:

Screenshot 2025-06-05 at 7.05.28 PM.png

 

Moving Account/Cart buttons to the  menu line can not be done nicely with CSS only; also, as seen in the screenshot -- they would not fit, there is much more space for them in the logo line.

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com