CSS :out-of-range Pseudo-class
Example
Select and style the input field only if the value of the field is outside the range limit:
input:out-of-range {
border: 2px solid red;
background-color: pink;
}
Try it Yourself »
Definition and Usage
The CSS :out-of-range
pseudo-class matches any
elements with a value outside the given range limit.
Note: The :out-of-range
pseudo-class
is used for <input> elements with min and/or max attributes.
Tip: Use the :in-range pseudo-class 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 pseudo-class.
Pseudo-class | |||||
---|---|---|---|---|---|
:out-of-range | 53 | 13 | 50 | 10.1 | 40 |
CSS Syntax
Related Pages
CSS Reference :in-range