I'm not sure you can do actual class/selector overrides. You would need to target each element that used the .tree
class and set the CSS. The quickest and easiest way would be through jQuery (or another similar framework):
$('.tree').each(function() { this.style.color = "red"; });
You could even use the built-in CSS functions:
$('.tree').css('color', 'red');
(I did it the first way to show you how standard JS would do it. The $(...)
part is jQuery for selecting all elements with the .tree
class. If you're not using jQuery, you'd need alternative code.)
If tree
is an ID, not a class (there should only be one on the page) so using getElementById should be fine. Your code should look like the other answer.