CSS override color

is it possible to override a color on several pages for different styles with CSS ? If the page uses a color for hoover or text on other places… is there a command to say… exchange all #color A with color #colotB


and… can you change with css content? override a header text or a footer text for example…


You could add a class - either to the text you’re targeting, or to the page itself - to allow you to apply different styles on those pages.

CSS is for appearance, not for content. To change header or footer text on certain pages, the easiest approach is probably to use PHP includes, and just use a different include on some pages.

1 Like

Hy see…

To give the second rule higher specificity you can always use parts of the first rule. In this case I would add table.rule1 trfrom rule one and add it to rule two.

table.rule1 tr td {
    background-color: #ff0000;

table.rule1 tr td.rule2 {
    background-color: #ffff00;

After a while I find this gets natural, but I know some people disagree. For those people I would suggest looking into LESS or SASS.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.