Posted By

alexilin on 07/21/11


Tagged

ie max-width min-width


Versions (?)

Min and max width in IE6


 / Published in: JavaScript
 

  1. <!--[if lte IE 6]>
  2. <script type="text/javascript">
  3. window.attachEvent('onload', mmwidth);
  4. window.attachEvent('onresize', mmwidth);
  5. function mmwidth(){
  6. document.getElementById('somediv').style.width = ((document.documentElement.clientWidth ||
  7. document.body.clientWidth) < 1000) ? '1000px' :
  8. ((document.body.clientWidth > 1000) ? 'auto' : 'auto');
  9. };
  10. </script>
  11. <![endif]-->

Report this snippet  

You need to login to post a comment.