Posted By

sidisinsane on 11/28/08


Tagged

css hack ie min-height


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

rickfu
sulfurito


Crossbrowser min-height


 / Published in: CSS
 

Only tested in Safari 3, Opera 9.5 and Firefox 2 (all Mac OS) for now, but it should actually work. If you run into any problems, please provide some feedback.

  1. selector {
  2. height: 10em; /* min-height for IE. Must be declared above declaration for other browsers! */
  3. }
  4. selector:empty {
  5. min-height: 10em; /* min-height for browsers other than IE */
  6. height: auto !important; /* Override previously declared height for browsers other than IE */
  7. }
  8.  
  9. or even simpler:
  10.  
  11. selector {
  12. min-height: 10em; /* min-height for browsers other than IE */
  13. height: auto !important; /* Override declared height for browsers other than IE */
  14. height: 10em; /* min-height for IE */
  15. }

Report this snippet  

You need to login to post a comment.