Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

:-moz-last-node Redirect 1

« CSS « CSS Reference « Mozilla Extensions

Summary

The :-moz-last-node pseudo-class matches an element that is the last child node of some other element. It differs from :last-child because it does not match a last child element with (non-whitespace) text after it.

Syntax

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

Examples

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

...where...

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

Notes

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

Document Tags and Contributors

 Last updated by: Sheppy,