I would like to centre the menu in my theme to the page, not with equal space between the logo and the cart/search. I want it to line up with the text in the banner. How can I do this?
Topic summary
A Shopify store owner wants to center their navigation menu in the Sense theme, aligning it with banner text rather than spacing it between the logo and cart/search icons.
Solutions Provided:
Multiple users offered CSS code modifications to base.css:
- Ujjaval suggested using
position: absolutewithmargin-left: 22%for the header inline menu, plus adjustments to logo max-width - oscprofessional provided similar CSS targeting
.header--middle-leftwith absolute positioning - Dan-From-Ryviu recommended modifying the grid template around line 3001, changing
grid-template-columnsto1fr 1fr 1frto create equal column spacing
Outcome:
The original poster successfully implemented one of the solutions, though initially encountered an issue where the logo became too small. After clarification about the existing code structure and adjusting the implementation, the problem was resolved and the menu is now properly centered.
@newwaveceramics
add below css into base.css file . If you want something like this?
@media screen and (min-width: 990px)
{
.header--middle-left .header__inline-menu {
position: absolute;
margin-left: 22%;
}
.header__heading-logo {
max-width: 126px !important;
}
.header__heading {
justify-self: left !important;
position: absolute;
}
}
Hello @newwaveceramics
Try this code if you find it helpful:
Go to Online Store >Theme>Edit code>Assets>base.css>add code at the bottom
@media screen and (min-width: 990px){
.header__heading {
justify-self: left !important;
position: absolute;
}
.header__heading-logo {
max-width: 120px !important;
}
.header--middle-left .header__inline-menu {
margin-left: 20% !important;
position: absolute;
}
}
Hi @newwaveceramics , you can do that by editing CSS code in Online store > Themes > Edit code > Assets > base.css, find this code around line 3001
.header--middle-left {
grid-template-areas: "navigation heading icons" !important;
grid-template-columns: 1fr 1fr 1fr !important;
}
Change it to like this
.header--middle-left {
grid-template-areas: "heading navigation icons" !important;
grid-template-columns: 1fr 1fr 1fr !important;
}
Then save file and here is the result
That has worked but now my logo is very small and can’t be increased
Your preview looks good, but this is what it currently says at 2297:
.header–middle-left {
grid-template-areas: ‘heading navigation icons’;
grid-template-columns: auto auto 1fr;
column-gap: 2rem;
}
Looks good but can I get the logo bigger than this?
I swapped it out and it’s working. Thank you!

