<table>
<tr><td>1</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td>1</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td>1</td><td>1</td><td>1</td><td>1</td></tr>
<tr><td>1</td><td>1</td><td>1</td><td>1</td></tr>
</table>
table{border: 1px solid red}
table td{border: 1px solid blue}
table tr:first-child td{border-top:none}
table tr:last-child td{border-bottom:none}
table tr td:first-child{border-left:none}
table tr td:last-child{border-right:none}
but as i know first child and last child are not fully compatible with IE, i've tried with ie9 and works ok, you should try in every browser
or you can use classes to get the first and the last row, and the first and the last column
or more you can change the color with js