0

I have used pseudo-classes in the project, that i am currently working on, and since it is already javascript heavy I am trying to avoid using selectivizr. Is there are way making psedoclass compatible with IE8? Is it possible to use Modernizr to resolve this issue?

Any advise would be much appreciated.

ramesh
  • 2,296
  • 4
  • 19
  • 29
  • Which pseudo-classes? The basic ones like `:link`, `:hover`, `:first-child` all work with IE8. – BoltClock May 03 '13 at 14:49
  • I am working with first-child, last-child and nth-child. So I have issues with last-child and nth-child. – ramesh May 03 '13 at 15:34

1 Answers1

0

You could check for css-lastchild with Modernizr (you'll find it in the Non-core detects section) and customize your styles if the browser doesn't support css-lastchild - which would mean it doesn't support any other of the CSS3 selectors either, which are:

  • :root
  • :nth-child()
  • :nth-last-child()
  • nth-of-type
  • nth-last-of-type()
  • :last-child
  • :first-of-type
  • :last-of-type
  • :only-child
  • :only-of-type
  • :empty
  • :target
  • :enabled
  • :disabled
  • :checked
  • :not().
Kriszta
  • 670
  • 1
  • 7
  • 22