For the first two children you can use:
ul li:nth-child(-n + 2) {
color: orange;
}
http://jsfiddle.net/nYnSz/1/
For the last two:
ul li:nth-last-child(-n + 2) {
color: orange;
}
http://jsfiddle.net/nYnSz/
For the first two children you can use:
ul li:nth-child(-n + 2) {
color: orange;
}
http://jsfiddle.net/nYnSz/1/
For the last two:
ul li:nth-last-child(-n + 2) {
color: orange;
}
http://jsfiddle.net/nYnSz/