IE6 vs. DIV height 100%
Posted: 03 July 2009 03:17 PM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2009-07-03

I’ve worked around a couple of times with DIVs using height:100% and I had no problems at all, testing on may browsers (IE7, IE6, FF3, FF2, Opera, Safari and Chrome).
Now I’ve tried the same idea on a new website and I can’t see what’s going wrong on IE6. The DIV never covers the entire page.

Any ideas? Thanks for your help,

Emerson

The entire code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "... no links allowed ...">

<
html>
    <
head>

        <
style type="text/css">
            
body {background-color:#999999;}
            
            
htmlbody {margin:0padding:0;}

            
/* IE6 Hack */

            
html html {height:100%;}

            
/* IE6 Hack */

            
html body {height:100%;}

            
*, body {margin:0padding:0;}

            
.outerContainer {width:100%; min-height:100%; position:absolutedisplay:block;}

            
/* IE6 Hack */
 
            
html .outerContainer {height:100%;}

            
.mainDiv {width:1000pxmargin:0 auto 0 autodisplay:blockbackground-color:#C0C0C0;}

            
.lockerContainer {width:100%; height:100%; position:absolutetop:0pxleft:0pxbackground-color:transparentbackground-color:#000000; opacity:.6; filter:alpha(opacity=60); z-index:20;}
        
</style>
    </
head>
    <
body>
        <
div class="outerContainer">
            <
div class="mainDiv">
                <
br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
                <
br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
                <
br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
                <
br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
                <
br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
                <
br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
            </
div>
            <
div class="lockerContainer"></div>
        </
div>
    </
body>
</
html
Profile
 
 
Posted: 11 July 2009 12:31 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  1
Joined  2009-07-11

You can add

overflow:hidden;


in the .maindiv class…..

Works in most browsers

Profile
 
 
Posted: 13 July 2009 06:26 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  1
Joined  2009-07-13

Such a very amazing link!

demande pret personnel

Profile
 
 
Posted: 15 July 2010 08:09 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  1
Joined  2010-07-15

Finally i found this through google


Regards


gorge245

Profile
 
 
Posted: 21 December 2010 05:09 PM   [ Ignore ]   [ # 4 ]
Jr. Member
RankRank
Total Posts:  42
Joined  2010-12-14

set position to relative,it will work like a charm.

Profile
 
 
   
 
 
‹‹ IE 7 Wrapper display issue      IE 7 problem ››