Information
All the four containers above have been given a minimum height of 8em.
Containers 1, 2 and 4 do not have sufficient text to fill the 8 em height and have spare capacity.
Container number 3 has more text and has expanded to fit this extra text.
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.
Cascading Style Sheet
/* 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;
}
/**/
Copyright
You may use this method on your personal 'non-profit' web site without seeking my permission. A link back to CSSplay is always appreciated.
Commercial usage is also permitted without seeking approval, but I would ask that a donation is considered to support my work on CSSPlay.
If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.
-
Do you have a website? Check women jokes get your laughs on
indoor lighting
print photos on canvas
CSS play Recommend
- Web Banner Design
Unique designs from $20 - Myspace layouts and counter
Lyrics, polls, images & backgrounds -Free! - Northstar Hire
Pre book private car hire, Gloucester UK - www.thai.se
Thailand guide - Web Hosting
Plans start at only $2.99/month - Register Domain Name
- Online PR-Portal Social Media News
Our Press releases you can read on OA News - SEO
Free SEO Analysis From SEO Consult - web designer
- Phuket guide
A complete guide to Phuket - Leading digital agency
Search & social experts to increase traffic - Pretronics UK
Pre Press Servicing - Website Design
- SEO
- wholesale





