E

Last updated on

The :enabled pseudo-class in CSS selects focusable elements that are not disabled, and therefore enabled. It is only associated with form elements (<input>, <select>, <textarea>). Enabled elements includes ones in that you can select, that you can enter data into, or that you can focus on or click. So when a checkbox is checked, and you are

Continue reading →

Last updated on

The :empty pseudo selector will select elements that contain either nothing or only an HTML comment. div:empty { display: none; } Will Match <div></div> <div><!– test –></div> Will Not Match <div> </div> <div> <!– test –> </div> <div> </div> It’s useful for hiding empty elements that might cause weird spacing (e.g. they have padding). Or something like

Continue reading →