Change product name color

Topic summary

Goal: change the product title that turns blue when selecting options to black.

Context: A store link and a screenshot were provided to show the blue product name state. The issue appears to be CSS styling of the product title (possibly a link state) in the product section.

Proposed solutions (CSS):

  • Add CSS in assets/base.css targeting the title element, e.g., .product .product__title h2 { color: #000; }.
  • Add an inline before in theme.liquid with a more specific selector (e.g., .product a.product__title h2.h1 { color: #000 !important; }).
  • Add CSS in assets/base.css targeting .product__title h1 { color: #000 !important; }.

Notes:

  • Different selectors (h1 vs h2, link vs non-link) reflect theme-specific markup; the correct choice depends on the theme’s HTML. Some suggestions use !important to override existing styles.
  • Action items: edit code via Online Store → Themes → Edit code, then either update base.css or insert an inline style in theme.liquid.

Status: No confirmation from the original poster; resolution not yet verified.

Summarized with AI on December 16. AI used: gpt-5.

How to change the color of the product name that when I click to select options it’s showing the product name color blue, i want to make it black,

here my store link: https://b6448a-44.myshopify.com/

1 Like

Add This css in your edit code > base.css file

.product .product__title h2 {
    color: #000;
}
1 Like

Hello @ai41

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

.product a.product__title h2.h1 { color: #000 !important; }

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.

Hello @ai41

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > base.css and paste this at the Bottom of the file:
.product__title h1 {
color: #000!important;
}