Min/Max-Height/Width Workaround for IE


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

[via rtcrm]


Copy this code and paste it in your HTML
  1. .minHeight {
  2. min-height: 200px;
  3. height: auto !important;
  4. height: 200px;
  5. }
  6.  
  7. .minWidth {
  8. min-width: 200px;
  9. width: auto !important;
  10. width: 200px;
  11. }
  12.  
  13. .maxHeight {
  14. max-height: 700px;
  15. height: auto !important;
  16. height: expression( document.body.clientHeight > 700 ? "700px" : "auto" );
  17. }
  18.  
  19. .maxWidth {
  20. max-width: 700px;
  21. width: auto !important;
  22. width: expression( document.body.clientWidth > 700 ? "700px" : "auto" );
  23. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.