Reputation: 41
Is it safe to use CSS pseudo class first-child with regards to browser support and the like?
Thanks.
Upvotes: 4
Views: 1195
Reputation: 38956
You can support CSS2 pseudo-classes in IE5/IE6 by using Dean Edwards IE7 JS library
It's free, easy to use and highly recommended. Just put the following code in your HEAD:
<!--[if lt IE 7]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta2)/IE7.js"></script>
<![endif]-->
Despite the BETA label It's never given me any problems and it solves a whole range of IE6 lameness issues.
Upvotes: 2
Reputation: 625027
Depends which browser.
IE6 doesn't support it. See :first-child and :last-child:
Not supported by Explorer 6- on Windows.
Explorer 7, Safari 3.0, iCab only support :first-child.
Upvotes: 6