To target an element that is the child of another you simply put a space between the two:. Am I wrong ? Thanks for your help, i appreciate that :) but like i said, li::before:not(.menu-item) {content:”●”} (is the same as) The :not() selector selects all elements except the specified element. Of course using the not yet widely available level 4 selectors (body:not(.home, .away, .page-50) would be simpler: If the tag is “body” and the class list does not include any of “home”, “away” or “page-50”, then …. Try container > *:not(.some class):not(:first-child), you should have better luck chaining nots rather than chaining selectors inside a not. .div-class p{font-weight: bold;} The first rule is not needed if the second rule is present. Since it is used to prevent a specific items from list of selected items. This should be bold. How do I target an element inside a class in css? Syntax $(":parent") jQuery Selectors. Coyier and a team of swell people. business, with a local development tool to match. a decision I'm very happy with. If the tag is “body” and the class list does not include “home” and the class list does not include “away” and the class list does not include “page-50”, then … Of course using the not yet widely available level 4 selectors (body:not(.home, .away, .page-50) would be simpler: One of the common CSS techniques that can be a bit tricky at first is being able to absolutely position a child div element within a parent div container, relative to the parent. The :has Pseudo-Class; Combining :has and :not; Using the jQuery Parent Selector. So you can use :not() wherever, but we might have to hold off on using it with a list of selectors for now, like so: Selectors list inside the :not() selector is part of Selectors 4 Spec. Syntax::not(element) { // CSS Property } The :not() selector doesn’t add any specificy by itself, but what is inside does, so :not(.foo) adds the same weight as .foo does. On the front page of CSS-Tricks I see this done with some a tags successfully (the site looks dayung good.) The passed argument may not contain additional selectors or any pseudo-element selectors. a decision I'm very happy with. Definition and Usage. Essentially, just another selector of any kind. Is saying “Every li AND Every li that isn’t .menu-item should have content ●”. Being able to chain selectors within :not() is not fully supported but :not() itself is https://caniuse.com/#feat=mdn-css_selectors_not. The :not() selector excludes the element passed to it from selection. That’s what the :not() selector is for. isn’t working, while .. The negation pseudo-class, :not(X), is a functional notation taking a simple selector […] as an argument. The code was like this: …which is just insane. In css there is deep philosophy between parent elements and its respective child elements.