-2

Why doesn't this work in IE8?

http://jsfiddle.net/QqMjL/

table.points > tbody > tr > td {
    padding:8px 0px 8px 0px;
}

table.points > tbody > tr > td:last-child > div {
    border:1px solid #a5bcd0;
    border-left:3px solid #a5bcd0;
    border-right:0px;
    padding:5px 6px 6px 10px;
    background:#fcfeff;
}

<table class="points">
    <tr>
        <td>test</td>
        <td><div>hey</div></td>
    </tr>
</table>
clarkk
  • 27,151
  • 72
  • 200
  • 340
  • Duplicate Question: http://stackoverflow.com/questions/1293369/using-last-child-in-css – Martin Schlagnitweit Sep 07 '11 at 10:45
  • Because IE8 doesn't support `:last-child.` I suppose you were misled by [this answer](http://stackoverflow.com/questions/7228800/how-to-select-first-and-last-td-in-a-row/7228819#7228819) which implied it'd work in IE7 and later. It does not. – BoltClock Sep 07 '11 at 10:58

1 Answers1

1

IE8 and below doesn't support :last-child http://www.quirksmode.org/css/contents.html#t35

This seems to do what you want http://jsfiddle.net/QqMjL/3/

Chris
  • 2,630
  • 3
  • 31
  • 58