:last-child no selecciona el último elemento [duplicado]
Frecuentes
Visto 27,899 veces
17
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?
1 Respuestas
18
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 css css-selectors or haz tu propia pregunta.
Please show us the resulting compiled CSS or even a demo. - Chris
@Abody97 I have updated the question with the compiled CSS. Thanks. - Yahreen
It looks fine to me -- do you have some other CSS that defines background images? A demo would be great. - Chris