Forum Moderators: not2easy
I have a template based website that sets the following propery in its main css file default.css:
A:link {
text-decoration: none;
color: #003366;
}A:visited {
text-decoration: none;
color: #003366;
}
A:hover {
text-decoration: underline;
color: #ff0000;
}
A:active {
text-decoration: none;
color: #003366;
}
Now I have this specific module (forum) that uses its own css ettings in module.css. In this module, I need to alter the a: properties on a paticular cell in a table via a CSS class like this:
<td class = "cellclass"> Here's the "cellclass" setting in my module.css:
.afforumrow a:link {text-decoration:none; color:#000000;}
.afforumrow a:visited {text-decoration:none; color:#000000;}
.afforumrow a:hover {text-decoration:underline; color:#000000;}
.afforumrow a:active {text-decoration:none; color:#000000;}
Now everthing works fine in IE. But in FireFox the a:visited propery set by my "cellclass" does not override the a:visited propery set in the main CSS file. When the link has not been clicked, it does display "#000000"; however once it's clicked, it dispalys "#003366" instead of "#000000" as it's instructed to in module.css.
I have tried adding "!important" in the cellclass but it still doesn't work.
Your help would be appreciated!
.afforumrow a:link {text-decoration:none; color:#000000;}
.afforumrow a:visited {text-decoration:none; color:#000000;}
.afforumrow a:hover {text-decoration:underline; color:#000000;}
.afforumrow a:active {text-decoration:none; color:#000000;}
is actually
.cellclass a:link {text-decoration:none; color:#000000;}
.cellclass a:visited {text-decoration:none; color:#000000;}
.cellclass a:hover {text-decoration:underline; color:#000000;}
.cellclass a:active {text-decoration:none; color:#000000;}
Thanks.
If you are using a template and calling different CSS files, make sure the one containing the td.cellclass styles is listed last.
Read more about Cascading Order [blooberry.com] and Inheritance.