I have read about not being able to change the parent in CSS using pseudo classes such as :focus, so I am here to see if I am doing something wrong or if there is a javascript alternative.
I'd prefer not to use javascript at all though, if possible.
Here is my current code:
.box:focus .test{
background: #00FF00;
}
So that code should change the background of the DIV .test to green when I click inside the textbox .box.
However this dosen't work, please could someone point me in the right direction, thanks.
Here is a code snippet of my HTML, this is a test page so I can see how this works.
<input name="textfield" type="text" class="box" id="textfield" />
<div class="test" id="test">Content for id "test" Goes Here</div>