Content disappear in IE6/Maxthon with expressions


/ Published in: CSS
Save to your folder(s)

Content may disappear on window resize in IE6/Maxthon, when using expressions to set min-width/max-width. To fix it - just remove 'position:relative' in #container.


Copy this code and paste it in your HTML
  1. /* style.css
  2. -------------*/
  3. #container {
  4. position:relative; /* remove this */
  5. min-width:999px;
  6. max-width:1140px;
  7. margin:0px auto 0px auto;
  8. z-index:1;
  9.  
  10. }
  11.  
  12. /* ie6.css
  13. -------------*/
  14. #container {
  15. position:static; /* or you can add this only to ie */
  16. width:expression((document.documentElement.clientWidth || document.body.clientWidth) <= 1001? "999px" :
  17. (document.documentElement.clientWidth || document.body.clientWidth) >= 1142? "1140px" : "auto");
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.