CSS - :-moz-first-node

The :-moz-first-node CSS pseudo-class represents any element that is the first child node of some other element. It differs from :first-child because it does not match a first child element with (non-whitespace) text before it.

Example

CSS

span:-moz-first-node {
  background-color: lime;
}

HTML

<div>
  <span>:-moz-first-node</span>
  <span>:-moz-last-node</span>
</div>

Syntax  

span:-moz-first-node { style properties }

Description  

The :-moz-first-node CSS pseudo-class represents any element that is the first child node of some other element. It differs from :first-child because it does not match a first child element with (non-whitespace) text before it.

Any white space at the start of an element is ignored for the determination of :-moz-first-node.

See Also  

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/css/:-moz-first-node