Using a min-height CSS hack

September 9th, 2009

Using a min-height CSS hack

So here is a quick reminder when you create layouts in CSS. Since most modern browsers such as Safari, Firefox or IE7 and above can render the min-height property in CSS but IE6 cannot; the only way is to cheat. In order to use this, you will need to incorporate the following CSS snippet to the region that you need a certain height set. /* min-height hack for ie6 */ min-height: 140px; height: auto !important; height: 140px; This is particularly useful for layout of a webpage especially when you set an image in the background that is a certain size. Rather than have the background image appear as text or content fills up, always have the background image in the back of the layout container set for a minimum height. I found the tip at http://snipplr.com/view/2237/ie6-minheight-hack/ SHARETHIS.addEntry({... Continue Reading...

Tags: , , ,
Filed under Coding | No Comments »