I have the following code:
<style>
input:valid ~ .test {
border: 1px solid green;
}
input:invalid ~ .test {
border: 1px solid red;
}
input:valid {
border: 1px solid green;
}
input:invalid {
border: 1px solid red;
}
</style>
<input type="text" required />
<div class="test">test</div>
now if u start typing in the textbox, the validation should modify the borders of both the input and the "test" div. This works in Chrome, however in IE the "test" div border change only gets triggered once i click somewhere else.
Why does this behave different in IE? and how can i make it work properly
EDIT: potatopeelings's answer was correct, but it seemed i simplified my question a bit too much.
input:valid ~ small .actionEmpty {
display: block;
}
input:invalid ~ small .actionEmpty {
display: none;
}
it doesn't seem to work in case of display css settings, well the invalid one seems to work and the valid one doesn't weird. the behavior there is still on mousedown
any more ideas?