mozilla

Revision 70998 of :-moz-last-node

  • Revision slug: CSS/:-moz-last-node
  • Revision title: :-moz-last-node
  • Revision id: 70998
  • Created:
  • Creator: DBaron
  • Is current revision? No
  • Comment /* Summary */

Revision Content

{{template.CSSMozExtensionRef()}}

Summary

The :-moz-last-node pseudo-class matches an element that is the last child node of some other element. It differs from {{template.Cssxref(":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.

Revision Source

<p> 
{{template.CSSMozExtensionRef()}}
</p>
<h3 name="Summary"> Summary </h3>
<p>The <code>:-moz-last-node</code> pseudo-class matches an element that is the last child node of some other element.  It differs from {{template.Cssxref(":last-child")}} because it does not match a last child element with (non-whitespace) text after it.
</p>
<h3 name="Syntax"> Syntax </h3>
<pre class="eval">span:-moz-last-node { <i>style properties</i> }
</pre>
<p><br>
</p>
<h3 name="Examples"> Examples </h3>
<pre>span:-moz-last-node
{
    background-color: lime;
}
</pre>
<p>...where...
</p>
<pre>&lt;div&gt;
  &lt;span&gt;:-moz-first-node&lt;/span&gt;
  &lt;span&gt;:-moz-last-node&lt;/span&gt;
&lt;/div&gt;
</pre>
<h3 name="Notes"> Notes </h3>
<p>Any white space at the end of an element is ignored for the determination of <code>:-moz-last-node</code>.
</p>
Revert to this revision