JCRussCSSNOT

Learn more about the CSS3 NOT selector

By | | CSS | CSS3 | Programming

5

To coincide with our new Jump Start book series, Learnable and SitePoint have produced a series of JumpCasts — bite-sized video tutorials covering a range of dev and design topics. If you like what you see here, there are plenty more over at our sister site, Learnable.com.

To start off, join Russ Weakley from Max Design as he presents a Learnable JumpCast on a new CSS3 selector called the “not” selector.

The interesting thing about the “not” selector is that it’s the opposite of almost every other selector you’ve used. In most cases, you’re aiming to style something very specific: “I want to style that element” or “that subset of elements”. With the not selector, you’re doing the opposite. Instead of styling one element, you’re saying, “I want to style everything but that element”. We’re doing the opposite of most other selectors. Head over to Learnable to find out more …

Learn Responsive Web Design

Join Learnable $29 Includes all SitePoint books

Jess Genevieve Brown

Jess is a video content creator for Learnable and Sitepoint. She digs all things social media, Web 2.0, music, film, digital media and innovation. Feel free get in touch!

More Posts - Website - Twitter - LinkedIn

{ 5 comments }

Dre October 31, 2012 at 5:57 pm

Great stuff, Easy voice to follow and comprehensive.

Russ Weakley October 30, 2012 at 6:48 pm

@Charles, yes! you can use any selector before the :not() selector – including elements, classes, ids etc. The only restrictions are on what can be placed inside the brackets.

Charles @ CodeConquest.com October 30, 2012 at 1:48 pm

I am so glad this selector exists. It’s something I’ve needed quite a bit.

One question though: is it possible to select elements or class names? (example: h1:not or .classname:not)

Ernst Jansen October 30, 2012 at 1:48 am

Thanks a lot for sharing this JumpCast, I’ve learned something today since I .did:NOT(#know) { it:existed; }

Blake Petersen October 31, 2012 at 11:34 am

lol, funny stuff

Comments on this entry are closed.