Hi, i am trying to change the width my my mega menu and maybe center the column’s in it (not just center the text).
Any help appreciated ![]()
P/W: Password
A user seeks to modify their mega menu width and center its columns in the Testament Shopify theme.
Solutions Provided:
Two community members offered CSS code solutions:
First approach: Navigate to Online Store > Themes > Assets > main.css (or base.css/style.css) and add code to set the mega menu to 100% width with centered content using .megamenu.row.grid__wrapper and .span-12.auto selectors.
Alternative approach: Edit stylesheet.css in the assets folder with different CSS targeting navigation menu links and padding adjustments.
Issue Encountered:
The initial solution successfully widened and centered the mega menu, but unintentionally centered other page elements including ‘sort by’ and ‘filter’ boxes, plus payment icons in the footer.
Revised Solution:
A corrected CSS snippet was provided targeting .megamenu.row.grid__wrapper and span.span-12.auto.megamenu__list-container specifically to avoid affecting other page elements.
The discussion appears ongoing as the user evaluates the revised code.
Hi, i am trying to change the width my my mega menu and maybe center the column’s in it (not just center the text).
Any help appreciated ![]()
P/W: Password
Hi @SaucyPeach
Check this one.
From you Admin page, go to Online Store > Themes
Select the theme you want to edit
Under the Asset folder, open the main.css(base.css, style.css or theme.css)
Then place the code below at the very bottom of the file.
.megamenu.row.grid__wrapper {
max-width: 100% !important;
width: 100%;
margin: auto;
left: 0;
}
.span-12.auto {
width: fit-content;
justify-self: center;
}
And save.
Result:
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
Hello @SaucyPeach
Go to online store ---------> themes --------------> actions ------> edit code------->assets-----> stylesheet.css
add this code at the end of the file.
a.navigation__menulink.js-menu-link.is_upcase-true {
padding: 0 50px !important;
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
this is the exact result I’m looking for but it centers the ‘sort by’ and ‘filter’ boxes as well as the payment icons in the footer.
Is there a way around this?
Oh, Sorry for that. Replace on this code then.
Same Instruction.
.megamenu.row.grid__wrapper {
max-width: 100% !important;
width: 100%;
margin: auto;
left: 0;
}
span.span-12.auto.megamenu__list-container {
width: fit-content;
justify-self: center;
}
And Save.
Result:
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!