A user wanted to separate the navigation menu bar from the header in the Dawn Shopify theme to apply different background colors, as shown in an attached example image.
Solution provided:
Set the header “logo position” to “top center” in theme settings
Add custom CSS targeting .list-menu with full viewport width and custom background color
Remove bottom padding from the header element
Issue encountered:
The initial code caused dropdown menus to stretch across the entire screen width.
Final fix:
Changed the CSS selector from .list-menu to nav > .list-menu to specifically target only the main navigation menu without affecting dropdown submenus.
The issue was resolved with the refined CSS code, which successfully separated the menu bar visually while maintaining proper dropdown menu dimensions.
Summarized with AI on October 28.
AI used: claude-sonnet-4-5-20250929.
I would like to separate the menu (navigation) bar from the header so that they can be different colours like in the picture below. Is this possible?
I have tried a couple of code changes in the custom css box but they either change the alignment of the text in the drop down boxes or affect the mobile layout.