A child selector in CSS is the “greater than” symbol, it looks like this: ol > li { margin: 5px; } It means “select elements that are direct descendants only”. In this case: “select list items that are direct descendants of an ordered list”. To illustrate: <ol> <li>WILL be selected</li> <li>WILL be selected</li> <ul> <li>Will
Posts By: Renat
:checked
The :checked pseudo-class in CSS selects elements when they are in the selected state. It is only associated with input (<input>) elements of type radio and checkbox . The :checkedpseudo-class selector matches radio and checkbox input types when checked or toggled to an on state. If they are not selected or checked, there is no match. So when a
Adjacent sibling
The adjacent sibling combinator in CSS isn’t a selector on it’s own, but a way of combining two selectors. For example: p + p { margin: 0; } The plus sign (+) is the adjacent sibling combinator, between two paragraph tag (element) selectors. What this means is “select any paragraph tag that is directly after
:active
The :active pseudo selector changes the appearance of a link while it is being activated (being clicked on or otherwise activated). It’s usually only seen for a split second, and provides visual feedback that the element was indeed clicked. It’s most typically used on anchor links (<a href=”#”>). For instance, here’s CSS that will make anchor links