win_width.htc 493 B

123456789101112131415161718192021222324
  1. <public:component>
  2. <public:property name="retrait">
  3. <script language="JScript">
  4. function fixWidth(){
  5. if (element.className == "spip_cadre") retrait = 24;
  6. else retrait = 16;
  7. if (element.offsetWidth) {
  8. style.width = element.offsetWidth - retrait;
  9. } else {
  10. style.width = "90%";
  11. //alert (element.parentElement.tagName);
  12. }
  13. }
  14. var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
  15. if (supported) fixWidth();
  16. </script>
  17. </public:component>