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

Home Forums CSS [Solved] Last-child Reply To: [Solved] Last-child


These types of selectors can be really tricky to get, but you did the right thing by opening up a JSFiddle (I prefer Codepen :D ). What you’re looking for is something like this:

li:last-child > .asset {
  color: green;

That will make the immediate .asset child of li:last-child to be green, as seen here: