SitePoint
Reference
CSS
Selector Reference
Pseudo-classes
CSS3 Pseudo-classes
:enabled
CSS Live Demo: :enabled
(this page)
See also:
All Live Demos
CSS Live Demo: :enabled
Type your
CSS
here:
(any properties allowed except expression, behavior and @import)
input:enabled+span { color:#090; font-weight:bold; } input+span { color:#ccc; font-weight:normal; }
Type your
HTML
here:
(any tags allowed except script, iframe, frame, object, img and embed)
<form action="#"> <fieldset> <legend>Side-orders (where available)</legend> <label for="chips"> <input type="checkbox" id="chips" name="chips" /> <span>Chips</span> </label> <label for="veggies"> <input type="checkbox" id="veggies" name="veggies" /> <span>Veggies</span> </label> <label for="salad"> <input type="checkbox" id="salad" name="salad" disabled="disabled" /> <span>Salad</span> </label> <label for="potato"> <input type="checkbox" id="potato" name="potato" disabled="disabled" /> <span>Baked Potato</span> </label> </fieldset> </form>
Show me!
Your results appear here: