CSS glossary entries for ‘N’
- A navbar is the most common term used to describe a navigation block (or ‘menu’) in which links to the top level sections of a site are laid out horizontally; typically near the top of the visual display. Links to subsections typically ‘drop-down’ from each top level menu item in response to some user action, e.g. a mouse click, a touch event, or hover event. Menu items in these nested subsection menus may be stacked vertically or horizontally according to designer preference. Navbars are typically encoded in HTML as nested lists of links. CSS is used to stack the list items, or the links, horizontally rather than vertically as they would stack by default. Several different CSS property settings can be used to enforce horizantal stacking, e.g.‘float’, ‘display:inline’, ‘display:table-cell’, ‘position:absolute’, ‘position:fixed’, ‘flex’.
- Negation selector
- The negation selector is another name for the CSS ‘not selector’.
- Negations selector
- The negations selector (
E:not(s1, s2)
) is a CSS3 ‘pseudo-class selector’ that targets given elements which do not match any of the selectors listed within ‘parentheses’. See the ‘not selector’. - Not selector
- The not selector (
E:not(selector)
) is a CSS3 ‘pseudo-class selector’ that targets given elements which do not match a specified selector, i.e. the value delimited by the ‘parentheses’ must be a valid CSS selector in its own right. - Nth child of type selector
- The nth child of type selector (
E:nth-of-type
) is a CSS ‘pseudo-class selector’ which targets any element which is the Nth of its type within its immediate container. So for example, if a<section>
container began with<h2>
immediately followed by an<img>
and then by a series of paragraphs, the following selector would target only the second of those paragraphs:p:nth-of-type(2)
. This selector is notably more suitable for dynamic content than the ‘:nth-child’ selector, because the selection will continue to work even if non-targeted elements are added to its container, before or after it. - Nth child selector
- The nth-child selector (
E:nth-child(n)
) is a CSS3 ‘pseudo-class selector’ that targets the first element contained within the given element. It is typically used for selecting elements which are neither the ‘first child’ or 'last child of container. This selector should not be used for dynamic web content in which the order of children with the parent may change, because elements are added to or removed from the parent. In such cases, use the ‘nth child of type selector’. - Nth last child of type selector
- The nth-last child of type selector (
E:nth-last-of-type
) is a CSS3 ‘pseudo-class selector’ which works in almost exactly the same way as the ‘nth child of type selector’ except that its index position is counted from the end of the container, rather than the start. - Nth last child selector
- The nth-last child selector (
E:nth-last-child(n)
) is a CSS3 ‘pseudo-class selector’ that works in almost exactly the same way as the ‘nth-child selector’ except that its index position is counted from the end of the container, rather than the start.