Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS selecting list items all but last? Re: selecting list items all but last?

#55485
jamygolden
Member

It’s easier to ignore the first. So do this:

li + li{border-left: 1px solid red;}

That will place a border to the left of every list item except the first. This will work in IE7+