0

I have the following css:

.sign-up-cross.clone{
    top: 10px!important;
}

I have a modal with a "invite-contacts-modal" class which contain elements with "sign-up-cross clone" and I don't want that those element will have the css style above.

I try to use:

:not(.invite-contacts-modal) .sign-up-cross.clone{
    top: 10px!important;
}

It doesn't work.

sarit rotshild
  • 733
  • 2
  • 10
  • 19

1 Answers1

0

Regarding IE8 is better to use this solution:

.sign-up-cross.clone {top: 10px;} /* declare 10px; */
.invite-contacts-modal .sign-up-cross.clone {top: 0;} /* set another value if the parent is .invite-contacts-modal */
pavel
  • 26,538
  • 10
  • 45
  • 61
  • @panther-I use Chrome. – sarit rotshild Apr 27 '15 at 12:37
  • @sarit rotshild: What you use isn't nearly as important as what your users may potentially use. – BoltClock Apr 27 '15 at 12:44
  • @BoltClock- it's not my point. I just want to know how can I select a selector which is not in a specific element – sarit rotshild Apr 27 '15 at 12:47
  • 1
    This solution applies to any browser - the IE8 issue isn't pertinent. There is simply no good solution other than an override. See http://stackoverflow.com/questions/7084112/css-negation-pseudo-class-not-for-parent-ancestor-elements – BoltClock Apr 27 '15 at 17:17