ID

Posted by & filed under I.

The #id selector allows you to target an element by referencing the id HTML attribute. Similar to how class attributes are denoted in CSS with a “period” (.) before the class name, ID attributes are prefixed with an “octothorpe” (#), more commonly known as a “hash” or “pound sign”. <header id=”site-header”></header> #header { /* this

Continue reading →

:invalid

Posted by & filed under I.

The :invalid selector allows you to select <input> elements that do not contain valid content, as determined by its type attribute. :invalid is defined in the CSS Selectors Level 3 spec as a “validity pseudo-selector”, meaning it is used to style interactive elements based on an evaluation of user input. This selector has one particular use: providing a user with feedback while they are interacting

Continue reading →

:in-range

Posted by & filed under I.

The :in-range pseudo selector in CSS matches input elements when their value is within the range specified as being acceptable. <input type=”number” min=”5″ max=”10″> input:in-range { border: 5px solid green; } I believe it’s only relevant on input[type=number]. Range inputs don’t allow values outside their min/max and it doesn’t make much sense on any other

Continue reading →

:hover

Posted by & filed under H.

The :hover pseudo class in CSS selects elements when the mouse cursor is current over them. It’s commonly associated with link () elements. a:hover { color: green; text-decoration: underline overline; } So when a link like this is “hovered”: <a href=”#”>Go to CSS Park</a> It will turn green and have a line beneath and above

Continue reading →