Hi. I would like to change the color of the announcement bar (only the announcement bar) on our site. Changing the color in the announcement bar section using the “Customize” theme button does nothing so I must have code that is overwriting that somewhere.
The announcement bar background style is managed in a section starting on line 23 of header.liquid. The background-color attribute is the style in .annoucement-bar that you are looking for.
Here’s the snippet of the code to help you get oriented:
...
{% if section.settings.message %}
{% if section.settings.home_page_only == false or request.page_type == 'index' %}
...
You can change the #ff0000 to any hex color you want.
Also, you may want to check this plugin for Debut theme out.
It offers many more customizations, including announcement bar background & text color, sticky announcement bar, show only on home page or not, etc. All customizable directly from the customize page.
themecaster… I am a rookie to coding (even that may be generous) but I made the change below and still no luck. Do you see anything else that needs top be changed
You’re in the right place to change the alert bar color for an out of the box Debut theme. In this case, another css style is taking priority.
A good trick to use to determine what css style is driving the output is to use developer tools in chrome (press Ctrl + Shift + I on the HTML element). Here’s the relevant output in chrome:
Looks like there is a file called custom-style.css that is overriding the background color on line 156 and includes an !important directive to drive up the priority :