CSS Min Height IE

By gilbitron in CSS on 19/02/2009 at 08:23

Views: 277
Tagged: css
URL: http://www.cssplay.co.uk/boxes/minheight.html

Starter:

This works in IE, Opera, Firefox, Netscape, Safari.

All browsers that support min-height are given a min-height of 8em with height:auto which will expand the container to fit the text.

Internet Explorer will ignore min-height and is just given a height of 8em. The IE bug automatically expands the container to fit the extra text.

Main Course:

/* for understanding browsers */
.container {
width:20em;
padding:0.5em;
border:1px solid #000;
min-height:8em; 
height:auto;
}
/* for Internet Explorer */
/*\*/
* html .container {
height: 8em;
}
/**/
 

Expand Report Code | Install Coda Clip

Please log in to vote.

Compliments to the Chef

No comments yet...

How was your Meal?


  • Allowed HTML: <b><strong><u><i><em><a>

  • Why ask? It helps us stop spam comments.