replace nth-child pseudo selector with nth-of-type as ios8 safari fails on iphone