Contact Us


FriendFeed FriendFeed


follow us on twitter Twitter


 Rss Feed


Favorites Add to Favorites

Monday, June 22, 2009

How to have div min height

Basically when you specify a height to a div, ie6 will take it as minimum height. But ie7, firefox, chrome and modern browser will treat as height. So here is a simple way to have minimum height to all web browser.

Css Code:

For example, if you want to give 50px height to a div, Use the above code will work fine. That after 50px the height of the div will automatically expands.

Labels: , ,


Blogger despo said...

This does not work for IE6.
I had to override the min-height on IE6 by using _min-height:inherit;

Also, on IE7 even though min-height is meant to be supported I could only get it to work if I defined both height and min-height...

December 3, 2009 at 3:41:00 AM PST  
Anonymous Anonymous said...

replace height:50px => _height:50px. this will solve your issue

January 18, 2010 at 2:37:00 AM PST  
Anonymous Anonymous said...

Thanks it helped me out lots

August 18, 2010 at 3:23:00 AM PDT  
Anonymous Anonymous said...

Wow! I was just not looking for the right keyword. But I found this page when I searched for minimum height div. Great help. Thanks guys.

October 10, 2011 at 11:00:00 PM PDT  
Anonymous Anonymous said...

Thank You so much.....
It was really cool.:)

January 5, 2012 at 1:08:00 AM PST  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home