Caveats
- Remember this is alpha code. I’m still developing this solution, what you are looking at is work in progress. If you find a bug, report it. Chances are that it will get fixed in a future release.
- CSS fixes are applied to internal and
external style sheets. They are not applied to inline styles defined using an element’s
styleattribute. - Certain CSS hacks can adversely affect IE7.
The
voice-familyhack and other hacks that rely on Microsoft’s parsing bugs, may also trigger parsing bugs in IE7. Beware! - IE7 is not dynamic. That is, if you change the structure of your
document programatically, then you must refresh the IE7 CSS rules.
Do this by calling
document.recalc()after you have finished altering the document’s structure. IE7 does not currently support print media.IE7 does not support style sheet switching.The@mediadeclaration may adversely affect IE7.- Some JavaScript code can overwrite IE7 fixes. The
classNameandruntimeStyleproperties of elements are used frequently by IE7 and should be avoided if possible. If you must allocate classes, use the following scripting technique to preserve IE7 classes:// className functions // Dean Edwards 2004.10.24 function addClass(element, className) { if (!hasClass(element, className)) { if (element.className) element.className += " " + className; else element.className = className; } }; function removeClass(element, className) { var regexp = new RegExp("(^|\\s)" + className + "(\\s|$)"); element.className = element.className.replace(regexp, "$2"); }; function hasClass(element, className) { var regexp = new RegExp("(^|\\s)" + className + "(\\s|$)"); return regexp.test(element.className); };