mozilla

Revision 71001 of :-moz-last-node

  • Revision slug: CSS/:-moz-last-node
  • Revision title: :-moz-last-node
  • Revision id: 71001
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment Linkification; one or more formatting changes

Revision Content

{{ CSSMozExtensionRef() }}

Summary

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

{{ languages( { "fr": "fr/CSS/:-moz-last-node", "ja": "ja/CSS/:-moz-last-node" } ) }}

Revision Source

<p> {{ CSSMozExtensionRef() }}
</p>
<h3 id="Summary" name="Summary">Summary</h3>
<p>The <code>:-moz-last-node</code> <a href="/en/CSS/Pseudo-classes" title="Pseudo-classes">pseudo-class</a> matches an element that is the last child node of some other element. It differs from {{ Cssxref(":last-child") }} because it does not match a last child element with (non-whitespace) text after it.</p><h3 id="Syntax" name="Syntax"> Syntax </h3>
<pre class="eval">span:-moz-last-node { <i>style properties</i> }
</pre>
<h3 id="Examples" 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 id="Notes" 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>
<div class="noinclude">
</div>
{{ languages( { "fr": "fr/CSS/:-moz-last-node", "ja": "ja/CSS/:-moz-last-node" } ) }}
Revert to this revision