1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
4 <title>NEGATED :nth-last-child() pseudo-class</title>
5 <style type="text/css"><![CDATA[.red { background-color : red }
6 ul > li:not(:nth-last-child(odd)) { background-color : lime }
7 ol > li:not(:nth-last-child(even)) { background-color : lime }
8 table.t1 tr:not(:nth-last-child(-n+4)) { background-color : lime }
9 table.t2 td:not(:nth-last-child(3n+1)) { background-color : lime }
10 table.t1 td, table.t2 td { border : thin black solid }
12 <link rel="first" href="css3-modsel-1.xml" title="Groups of selectors"/>
13 <link rel="prev" href="css3-modsel-73b.xml" title="NEGATED :nth-child() pseudo-class"/>
14 <link rel="next" href="css3-modsel-74b.xml" title="NEGATED :nth-last-child() pseudo-class"/>
15 <link rel="last" href="css3-modsel-d4.xml" title="Dynamic updating of :first-child and :last-child"/>
16 <link rel="up" href="./index.html"/>
17 <link rel="top" href="../../index.html"/>
21 <li class="red">This first list item should have a green background</li>
22 <li>Second list item</li>
23 <li class="red">This third list item should have a green background</li>
24 <li>Fourth list item</li>
25 <li class="red">This fifth list item should have a green background</li>
26 <li>Sixth list item</li>
29 <li>First list item</li>
30 <li class="red">This second list item should have a green background</li>
31 <li>Third list item</li>
32 <li class="red">This fourth list item should have a green background</li>
33 <li>Fifth list item</li>
34 <li class="red">This sixth list item should have a green background</li>
37 <table border="1" class="t1">
39 <td>Green row : 1.1</td>
44 <td>Green row : 2.1</td>
70 <table class="t2" border="1">
72 <td class="red">green cell</td>
74 <td class="red">green cell</td>
75 <td class="red">green cell</td>
77 <td class="red">green cell</td>
78 <td class="red">green cell</td>
82 <td class="red">green cell</td>
84 <td class="red">green cell</td>
85 <td class="red">green cell</td>
87 <td class="red">green cell</td>
88 <td class="red">green cell</td>
92 <td class="red">green cell</td>
94 <td class="red">green cell</td>
95 <td class="red">green cell</td>
97 <td class="red">green cell</td>
98 <td class="red">green cell</td>