In my website projects, i use media queries and the nth-child selector.
IE8 doesn't support them out of the box, but there are polyfills to help:
- Respond.js, mediatizr or css3-mediaqueries.js enable media queries in IE8;
- selectivizr or ie9.js enable the nth-child selector.
My problem is that i need to use nth-child inside media queries. A synthetic example:
@media (min-width: 500px) {
.foo:nth-child(2n) {
color: pink;
}
}
I need this code to work in IE8.
The problem is that neither selectivizr, nor ie9.js parse nth-child
inside media queries, and media query-enabling polyfills won't help because they interfere with the nth-child
polyfills when used together.
Please suggest a way to make that code work in IE8!