Here is a typical way one might use :first-child: first you apply the image
to all links in the list, then you remove it from the first one.
1 2 3 4 | |
However, using theĀ Adjacent Siblings Selector, you can streamline it:
1 2 | |
The + selector applies the style to any LI that immediately follows an LI, which obviously rules out the first item. A simple solution, often overlooked.
Compatibility
| IE | Firefox | Safari | Opera | Chrome | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Version | 7.0 | 8.0 | 9.0 | 2.0 | 3.5 | 3.1 | 4.0 | 9.2 | 9.5 | 2.0 |
| + | Buggy | Full | Full | Full | Full | Buggy | Buggy | Buggy | Full | Full |
| :first-child | Buggy | Buggy | Full | Buggy | Full | Buggy | Full | Buggy | Full | Full |