Search code examples
cssclasssifrrules

How to apply a sifr rule to a hyperlink and also its a.active counterpart


Have a hyperlink inside of a h1... like so:
<h1 id="site-name"><a href="blah">blah</a><h1>

I apply a sifr3 rule to the css: h1#site-name

then inside sifr3-rules.js i apply the following rules... "a": { "text-decoration": "none" }, "a:link": { "color": "#FF0000" }, "a:hover": { "color": "#00FF00", "text-decoration": "none" }

But i realized in my Drupal site, it automatically adds .active class to the hyperlink, and the default link color won't work (however unusually the hover works)...

How can I set the rule so something like "a.active": { "color": "#FF0000" } gets applied? [that does't do anything btw, but i thought maybe it would help it out]


Solution

  • I don't believe Flash lets you select links with a class name (a.active). Best bet is to put the active class on the h1 instead. You can then replace h1.active to do the different styling. Make sure to replace it before the other h1s though.