css - Why does .b:not(#a>.b) not work? -


i'm working css , wondering why following piece doesn't work:

.container:not(#topic-title>.container) 

is there anyway else can achieve same thing? i'm open javascript solutions.

you use selector :

:not(#topic-title) > .container 

.container {      height:20px;  }  :not(#topic-title) > .container {      background:green;  }
<div id="topic-title">      <div class="container">parent #topic-title</div>  </div>  <div>      <div class="container"> parent not #topic-title</div>  </div>


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -