Change text color dynamically in WordPress [closed]

If you inspect the text, you’ll see that your theme’s CSS is overriding your custom CSS.

You have h2 { color: white; }

but your theme has .widget h2 { color: inherit; }

so “inherit” wins out. If you change your own CSS to

.widget h2 { color: white; }

it will override the theme. Incidentally, the markup here is quite overly complex; you might want to look into a simpler theme without quite so many nested divs.

error code: 521