26.05.2011 8:40, Chris Blake wrote:
http://blakeys.com/index.php/profile
I would like the current / active title to be a colour. I have managed
to find the tag to make hover work:
#page div.whitespace div.yoo-accordion dt span.header-r:hover{
color: red;
}
but :active doesn't seem to work.
You seem to expect :active to mean something that it doesn't. The CSS
specs are somewhat obscure, and implementations differ, but basically
:active applies "while an element is being activated by the user". It
should not be expected to apply after the activation, e.g. when a link
has been followed or, as in this case, an element has been clicked on
and the onclick event has been handled.
Since your page already relies on JavaScript (the items cannot be opened
at all when JavaScript execution is disabled), I'd suggest that you
modify the onclick event handler to change the element's class to, say,
"active", after changing the element that was previously in that class
to not be there. Then you can trivially use a class selector to change
the color.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/