Reputation: 531
I am using nth-child()
(both 'odd' and 'even') in my site,
which works fine in all browsers other than ie8, without using any js or jquery.
Can we make work these pseudo classes in ie8.
(I am not supposed to use any js or Jquery)
Thanks in Advance :)
Suggestions please.
my code is something like this,
.row-strip{
float: left;
min-height: 1px;
padding: 0px 3px;
&:nth-child(even){
background-color: @tableRowZebraBackgroundColor;
}
&:hover{
background-color: @tableRowHoverBackgroundColor;
cursor: pointer;
}
}
can you please elaborate how to make this done for ie8, with,
var childnumber = document.querySelectorAll('.row-strip:nth-child(3)');
Upvotes: 0
Views: 102
Reputation: 436
Yes, you can use querySelectorAll, that works fine in IE8.
var childnumber3 = document.querySelectorAll('div:nth-child(3)');
Upvotes: 1