I know I can set a style on the focused input element like this:
input:focus
{
background-color:yellow;
}
But is it somehow possible to set a style on a parent element when an input has focus? e.g.
<div class="foo">
<input type="text />
Hello
</div>
Can I affect the "foo" style when the input has focus here?
edit: Possible duplicate of Affecting parent element of :focus'd element (pure CSS+HTML preferred)
However, can someone explain how that works?