When using the CSS pseudo-class nth-child()
, I've noticed that it works perfectly in all browsers except for ie8. I'm looking for a solution that doesn't involve using JavaScript or jQuery.
Is there a way to make these pseudo-classes work in ie8?
(Please note that I am trying to avoid using any JavaScript or jQuery for this task.)
Thank you in advance for your help!
I have included a snippet of my code below:
.row-strip{
float: left;
min-height: 1px;
padding: 0px 3px;
&:nth-child(even){
background-color: @tableRowZebraBackgroundColor;
}
&:hover{
background-color: @tableRowHoverBackgroundColor;
cursor: pointer;
}
}
If possible, could you provide a detailed explanation on how to achieve this in ie8 using the following:
var childnumber = document.querySelectorAll('.row-strip:nth-child(3)');