:last-child no selecciona el último elemento [duplicado]

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

@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?

preguntado el 24 de agosto de 12 a las 20:08

Please show us the resulting compiled CSS or even a demo. -

@Abody97 I have updated the question with the compiled CSS. Thanks. -

It looks fine to me -- do you have some other CSS that defines background images? A demo would be great. -

1 Respuestas

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


Respondido 24 ago 12, 20:08

Hi, thanks for that link, if you have a moment could you take a look at my question here? stackoverflow.com/questions/16905061/… Not sure where I'm going wrong with converting that CSS into SASS compliant code - León Gabán

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.