Goal: Change the “SALE” menu item color to red in the header navigation.
What happened:
Initial CSS targeting a relative link in theme.css did not work.
Suggestions included adding !important, using nth-child selectors, and adjusting the selector to target .Heading.u-h6. One nth-child approach incorrectly affected other menu items.
Another suggestion referenced adding code in theme.liquid (details unclear) with a screenshot of results.
If your code css is right, you need to add pattern: “!important” after attribute color: red to overwrite CSS customize because CSS must adhere to a certain order of precedence.
Like this:
nav.Header__MainNav.hidden-pocket.hidden-lap li.HorizontalList__Item a[href="/collections/frames-of-festivity-sale"] {
color: red !important;
}
Or try add my code css in the end of file theme.css :
ul.HorizontalList.HorizontalList--spacingExtraLoose li:nth-child(1) a {
color: red !important;
}