views:

28

answers:

2

Howdy,
I love this neat thing found on css-tricks:

a:active {
  position: relative;
  top: 1px;
}

Every link gives a little trigger-response.

However, I want almost all my links to do that, except the ones inside of .children.

Can I create an exception like :not (from jQuery) within CSS?

Thank you for your help!

+2  A: 

You can just add an additional style rule in CSS, no need for JavaScript, like this:

.children a:active {
  position: static;
  top: 0px;
}
Nick Craver
You *technically* don’t need `top: 0px` in there, as `top` doesn’t have any effect on elements with `position: static`. But this is mere nitpicking.
Paul D. Waite
A: 

css

.children a:active {
  /* whatever */
}

assuming your use of ".children" is a class

Ross