What I’m trying to achieve here is to be able to select every last li within each row.
I have a ul with 6 list items which have been styled to have 3 rows and two columns. I need to be able to select the last item of each row to reset margins.
See example here: http://jsfiddle.net/FvBqA/162/
All suggestions welcome!
You can use the CSS3
:nth-child()selector. As CSS3 might not be compatible with all browsers, also consider jQuery’s :nth-child() selector.