CSS :out-of-rangeSelectors

Complete CSS Selector Reference Manual

Example

When the input value is outside the specified range, set the specified style:

input:out-of-range
{
border:2px solid red;
}

Try it Yourself »

Definition and use

The :out-of-range selector is used to style the display when the value of an element is outside the specified range.

Note:The :out-of-range selector only applies to elements that can have values outside a specified range, such as input elements with the min and max attributes.


Browser Support

The numbers in the table indicate the first browser version number that supports the property.

Selectors
:out-of-range 10.0 Not supported 28.0 5.2 11.0

CSS Syntax

:out-of-range
{
CSS Declaration;
}


Related Pages

CSS Selector:in-range


Complete CSS Selector Reference Manual

other extensions