indeterminate property CSS Reference



Definition and Usage

The :indeterminate CSS pseudo-class represents any <input type="checkbox"> element whose indeterminate DOM property is set to true by JavaScript. In addition, in some browsers, it can be used to match to <progress> elements in an indeterminate state.


Examples

<style>
input, span { background: red }
:indeterminate, :indeterminate + span { background: limegreen }
</style>
<p><input type=checkbox> <span>Everything in this paragraph should have a green background.</span></p>
<script> document.getElementsByTagName("input")[0].indeterminate = true; </script> 

Compatibility

Desktop browsers

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
type="checkbox" (Yes) 3.6 (1.9.2) 9.0 10.60 (2.6) 3.0
<progress> 6.0 6.0 (6.0) 10 NA 5.2

Mobile browsers

Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
type="checkbox" NA 1.0 (1.9.2) NA NA NA
<progress> NA 6.0 (6.0) NA NA NA

Relative articles