user

Jo Micheal

25 Jul 2022

Multiple classes in :not() function in CSS

HTML & CSS

Hello everyone,
How can I use :not with multiple classes? I am trying 

div:not(.light, .dark){
	/* CSS code */
}

and it's not working, any suggestions?   

Comments

Mohamed Atef

25 Jul 2022

Best Answer

best answer
githubgithubgithub

You can use it like this and it will work with you

div:not(.light):not(.dark){
	/* CSS code */
}

Replies

Jo Micheal

25 Jul 2022

Thanks this works 

© 2024 Copyrights reserved for web-brackets.com