I’d suggest applying the background colour to the menu’s enclosing div and then applying a fixed width to the menu ul itself along with margin:0 auto;
;
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
You may run into formatting issues for Firefox, but you could instead apply to your <ul>
element;
display: table;
margin: 0 auto;
And not specify a width.
Hi, thanks for the replies.
I tried adding
display: table;
margin: 0 auto;
to both “.main-navigation ul.nav-menu” & “.main-navigation ul” but unfortunately no luck.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
As you’re already displaying a width, you might as well do Esmi’s method.