**************************************************IMPORTANT***************** ***********************************************************<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
This e-mail contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of, distribution, copying or use of this e-mail or the information in it is strictly prohibited and may be unlawful. If you have received this in error please inform us at the above address then delete the e-mail and destroy any copies of it. Thank you. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Charles Blaquičre > Sent: 23 November 2006 01:31 > To: CSS-Discuss > Subject: Re: [css-d] html, body {min-height: 100%} fails in Firefox & IE7 > > > Ian Young wrote: > > >> Have a look at http://03.infocopa.com/apropos/vision.html . > >> > >> I've given 100% min-height (height for IE) to html and body. > >> (body has the > >> off-white background-color.) Unfortunately, on short pages like > >> this, if the > >> content is shorter than the window, the body won't extend all the > >> way to the > >> bottom. The problem shows up on Firefix and IE7, but not IE6. > > > > A few things strike me here. > > > > Don't need the html section > > Put the font-size and height in the body as 100%. > > Why put min height in the body? > > > > Add a height definition in the main-wrapper. After all this is what > > you want to be 100% in height, huh? The body will always be 100% - > > think about it! > > The wrapper can shrink or expand dependent on content . > > I used the code found in our very own CSS-Discuss Wiki: > http://css-discuss.incutio.com/?page=HundredPercentHeight . It's quite > educational. In Firefox, this is the only combination that seems to work: > > html, body {height: 100%} > #wrapper-main {min-height: 100%} /* height: 100% works also */ > > OK, with your suggestions, I have: > > html { > font-size : 100%; /* Unrelated to this problem */ > } > > body { > width : 80%; > display : table; > margin : 0 auto; > font-size: 0.8125em; /* Unrelated to this problem */ > line-height : 133%; /* Unrelated to this problem */ > } > > #wrapper-main { > height: 100%; > position: relative; /* Unrelated to this problem */ > padding : 30px; /* Unrelated to this problem */ > } > OK, Let's look at this again. I obviously didn't explain myself well enough - it was late. You still haven't defined height in the body so need html,body { height:100% font-size:100%} Height needs to be defined in body if you are going to define height in divs other wise they have nothing to relate to font-size really needs to be 100% - but that is another issue. OK you wanted a min height in % rather than pixels. I have rewriten my earlier code to: #wrapper-main{ width: min-height:100%; } Then add: <!--[if IE 6]> <style type="text/css"> #wrapper{height:100%;} </style> for IE6. This works for me across in FF, IE, Opera Ian -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.430 / Virus Database: 268.14.12/545 - Release Date: 21/11/2006 22:36 ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
