What I am able to do:
HTML:
<div id="test">
HELLO!
<input type="text">
</div>
CSS:
#test {
color:#F00;
}
#test input[type=text] {
background-color:#000;
}
What I'd like to do is the same thing if the #test has not an ID but a class:
<div class="test">
...
How should I write the CSS in this case?
#test, .test {}and#test input[type="text"], .test input[type="text"] {}if you weirdly need to be able to handle both cases.