Q:

Select element based in css property

I want to select a child element that has a specific background color.
For example, I have my parent #xxx (id) and it has lots of direct children. I want to select all the children from this parent #xxx that have bakground:#000
I searched a lot and couldnt find an answer. Could you help me? Something like this (of course it does not work):
#xxx > div(background:#000) {

}

A:

Some of you said this is not possible but it is possible. It's very possible. You just need to take care with the color, browsers (Chrome and Firefox latest that I could try) allow selection based in the background color BUT it has to be in RGB format and you need to use a space after the comma in the color. This will work perfectly:
#xxx[style*="background: rgb(255, 255, 255)"]>div:hover{
    border:10px solid #000000;
}

