ie7-squish.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* ---------------------------------------------------------------------
  2. Squish some IE bugs!
  3. Some of these bug fixes may have adverse effects so they are
  4. not included in the standard library. Add your own if you want.
  5. --------------------------------------------------------------------- */
  6. // @NOTE: ie7Layout.boxSizing is the same as the "Holly Hack"
  7. if (IE7.loaded && IE7.appVersion < 7) {
  8. // "doubled margin" bug
  9. // http://www.positioniseverything.net/explorer/doubled-margin.html
  10. IE7.CSS.addFix(/(float\s*:\s*(left|right))/, "display:inline;$1");
  11. // "peekaboo" bug
  12. // http://www.positioniseverything.net/explorer/peekaboo.html
  13. if (IE7.appVersion >= 6) IE7.CSS.addRecalc("float", "(left|right)", function(element) {
  14. IE7.Layout.boxSizing(element.parentElement);
  15. // "doubled margin" bug
  16. element.style.display = "inline";
  17. });
  18. // "unscrollable content" bug
  19. // http://www.positioniseverything.net/explorer/unscrollable.html
  20. IE7.CSS.addRecalc("position", "absolute|fixed", function(element) {
  21. if (element.offsetParent && element.offsetParent.currentStyle.position === "relative")
  22. IE7.Layout.boxSizing(element.offsetParent);
  23. });
  24. }
  25. //# // get rid of Microsoft's pesky image toolbar
  26. //# document.write('<meta http-equiv="imagetoolbar" content="no">');