:in-range and :out-of-range

Back to the index.

See also the CSS3 User Interface spec.

There are several pseudo-classes that are used to style the various states of form elements. This page tests some of them.

Test sheet:

input:out-of-range {
	border: 1px solid #CB000F;
	color: red
}

input:in-range {
	color: #00882D;
	font-weight: bold;
}

The field expects a number between 1 and 12. Anything else is out of range. Support for input type="number" is required for this test.