I've tried creating the following HTML file in Chrome:
<style>
br {
}
[required] {
border-width: 3px;
border-color: red;
}
</style>
<input required />
that is the complete content of the file. The [required]
rule does not match and the <input>
remains unstyled.
If the empty br rule is left out so that the file reads:
<style>
[required] {
border-width: 3px;
border-color: red;
}
</style>
<input required />
It works fine!
Why would the existence of the <br>
rule before the [required]
one cause [required]
to not match?
Thanks. (It works fine is jsfiddle, you need to actually create the files.)