CSS :in-rangeSelectors

Complete CSS Selector Reference Manual

Example

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

input:in-range
{
border:2px solid yellow;
}

Try it Yourself »

Definition and use

The :in-range selector is used for the style displayed when an element's value is within the specified range.

Note:The :in-range selector only applies to elements that can have a value range specified, 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 this property.

Selectors
:in-range 10.0 Not supported 28.0 5.2 11.0

CSS Syntax

:in-range
{
CSS Declaration;
}


Related Pages

CSS Selectors:out-of-range


Complete CSS Selector Reference Manual

other extensions