开发者

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

开发者 https://www.devze.com 2022-12-11 07:46 出处:网络
Have a hyperlink inside of a h1... like so: <h1 id=\"site-name\"><a href=\"blah\">blah</a><h1>

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 s开发者_开发问答omething like "a.active": { "color": "#FF0000" } gets applied? [that does't do anything btw, but i thought maybe it would help it out]


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.


you can do one of the following:

1- modify drupal's a.class rule to:

a.class {
  color:#f00;
}

this is in order to have a consistent website (all active links are red)

2- or you can override the CSS rule:

h1#site-name a.active {
  color:#f00;
}
  • make sure you include the js file after CSS files in order to override the rule.
0

精彩评论

暂无评论...
验证码 换一张
取 消