Monday 27 February 2012

Sibling selectors in IE

I've spend literally hours to understand why my cool freshly baked CSS with sibling selectors (like table th:first-child + th + th) works fine with FF but not in IE. And the problem was that if HTML page does not start with DOCTYPE "-//W3C//DTD XHTML 1.1//EN" or similar, IE will fallback to compatibility mode with "old" HTML thus effectively disabling some CSS features (see stackoverlow post). After the problem is identified it took minutes to correct XSL to produce DOCTYPE that IE wants to see.

No comments:

Post a Comment