change header color for homepage only (DAWN THEME)

Topic summary

A user is attempting to customize the Dawn theme header to display black on the homepage only (while keeping other pages white), with corresponding border color changes. They’ve implemented CSS code in the theme.liquid file using a template conditional, but encountered three styling issues:

Problems identified:

  • White hover effect persists on menu items and needs removal
  • Dropdown menu arrows remain invisible (black arrows on black background) and should be white
  • The ‘Accessories’ menu item displays an unwanted full white border/background

The user has shared a screenshot showing these visual issues and is seeking solutions to fix the styling conflicts. The discussion remains open with no responses yet.

Summarized with AI on November 1. AI used: claude-sonnet-4-5-20250929.

Hi there,

I want to change the header color for mobile and desktop view to ‘Black’ for *homepage only and the other pages to remain as the default color of dawn theme which is ‘White’ and showing a 1px white border line under the header for homepage and 1px black grid line on other pages.

I followed these steps below:

Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above tag:

{% if template.name == ‘index’ %}

sticky-header.header-wrapper { background-color: black; } .header__heading a.header__heading-link { filter: invert(1); } li.gm-item.gm-level-0.gm-has-submenu.gm-submenu-dropdown, .gm-menu-installed .header__inline-menu .gm-submenu.gm-dropdown.gm-orientation-vertical { background-color: black !important; } .gm-menu-installed .header__inline-menu li.gm-item.gm-level-0.gm-has-submenu.gm-submenu-dropdown .gm-text { color: #ffff !important; } body.gm-menu-installed .gm-menu.gm-menu-32270 li.gm-item.gm-level-0.gm-has-submenu.gm-submenu-dropdown.gm-submenu-align-center, body.gm-menu-installed .gm-menu.gm-menu-32270 li.gm-item.gm-level-0.gm-has-submenu.gm-submenu-dropdown.gm-submenu-align-left { border: none !important; }

{% endif %}

But these issues came up afterwards:

  • The white hover effect on the menus is still there and needs to be removed. It doesn’t fit with the design and is making things look off.

  • The dropdown menu arrows are still invisible because they’re black, and the background is also black. They need to be changed to white color.

  • The ‘Accessories’ menu now has a full white border or background that covers the entire item, which shouldn’t be happening. This needs to be fixed so it aligns with the rest of the design.

Any solutions for this ?

thank you in advance.