CSS Pseudo-class :last-child
This selector selects an element if it's the last child of another element. li:last-child
selects all li
s that are the last child of an ul
- it doesn't select all last children in li
s.
Examples
Compatibility
Chrome | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|
Any | Any | 9+ | 9.5+ | 3.2+ |