I\'d like to select the first two list items in an unordered list. I can select the first item thus:
ul li:nth-child(1) a {
background: none repeat scrol
Your best bet for cross-browser compatibility would be to use jQuery and assign a class to the list item.
Something like...
$( function() {
$('li').each( function() {
if( $(this).index() == 1 || $(this).index() == 2 ) {
$(this).addClass('first_or_second');
}
});
});