Example
Select and style only if the value of the <input> element is "out of range":
input:out-of-range
{
border: 2px solid red;
}
Try it Yourself »
Definition and Usage
The :out-of-range selector selects all elements with a value that is outside a specified range.
Note: The :out-of-range selector only works for elements with range limitations, such as input elements with min and max attributes.
Tip: Use the :in-range selector to select all elements with a value that is within a specified range.
Version: | CSS3 |
---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the selector.
Selector | |||||
---|---|---|---|---|---|
:out-of-range | 10.0 | Not supported | 28.0 | 5.2 | 11.0 |
CSS Syntax
Related Pages
CSS Selector :in-range