If you want to reproduce the issue I'm facing, visit the demo page of the storefront here: then remove the node
<ul id="site-header-cart" class="site-header-cart menu"></ul>
that contains the cart box (located next to the menu) so that only the main menu remains.
The challenge I'm encountering is trying to center the menu.
I've experimented with various combinations but I just can't grasp the logic behind the WooCommerce/storefront css. It's all very perplexing to me.
This is the CSS code that is currently effective for me...
.woocommerce-active .site-header .main-navigation {
width: 100%;
}
#menu-primary-menu {
display: table;
margin: 0 auto;
}
However, I am clueless about why it only functions with display: table
. I attempted using flexbox, but no flexbox rules appear to work at all! It's extremely frustrating to struggle with something seemingly basic.