Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
ARNAB ROY
Courses Plus Student 5,515 Pointsif i want not to give color o empty and s2 do we need to create two different selector or same selector can do this?
:div-not([id="s2"]){
.....
}
:not(:empty){
}
1 Answer
Ryan Duchene
Courses Plus Student 46,022 PointsWill this work for you?
:not(#s2),
:not(:empty) {
// your code here
}
EDIT: Actually, better yet...
:not(#s2, :empty) {
// your code here
}
ARNAB ROY
Courses Plus Student 5,515 PointsThanks Ryan. I was asking about the above syntax we can do it.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Arnab,
I'm not quite sure what you're asking here. Can you show some example html and then specify what you want to select or not select?
See this thread for how to post code: https://teamtreehouse.com/forum/posting-code-to-the-forum