The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS not selector Reply To: not selector


I would suggest you’d want div :not(h1) to target everything inside the div, except for the h1, but the code you posted isn’t making your requirements very clear.

To help us along, try making a simple CodePen demo to show us what you’re trying to do and what you’re having problems with.