Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

:last-child does not select the last element [duplicate]

I want to remove the background from the last figure element:

@media (min-width: 50em) {
  #mission #press figure {
    padding-left: 0;
    background: url('/assets/img/splash-green.png?1345829368') no-repeat 50% bottom;
  }
  #mission #press figure:last-child {
    background: none;
  }
}

The background still shows up. Am I mis-targeting?

like image 957
Yahreen Avatar asked Aug 24 '12 19:08

Yahreen


1 Answers

I think you might actually be looking for the functionality of last-of-type instead of last-child.

LINK

like image 150
SciSpear Avatar answered Oct 13 '22 02:10

SciSpear