IE6 vs. DIV height 100%

Discussion in 'HTML and CSS' started by emerson.marini, Jul 3, 2009.

  1. emerson.marini

    emerson.marini

    Joined:
    Jul 3, 2009
    Messages:
    1
    Location:
    Cambridge, United Kingdom
    Hi there,

    I know that question sounds old, but I'm using a 'workaround' that has worked many times before and suddenly it doesn't anymore.
    I have an overlay DIV to cover all the page (height 100%) and it works fine on every browser I've tried, except on the da** IE6.

    Any ideas? Thanks for your help,

    Emerson

    Here is the entire code:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ...>
    
    <html xmlns=".../1999/xhtml">
        <head>
            <style type="text/css">
                *
                {
                    border:0;    
                    outline:none;
                }
    
                body 
                {   
                    background-color:#999999;    
                }
    	
                /* IE6 Hack */
    		
                * html body
                {
                    height:100%;
                }
    			
                *, body
                {
                    margin:0;
                    padding:0;
                }
    
                .outerContainer
                {
                    width:100%;
                    min-height:100%;
                    position:absolute;
                    display:block;				
                }
    
                /* IE6 Hack */
    			
                * html .outerContainer
                {
                    height:100%;
                }
    	
                .mainDiv
                {
                    width:1000px;
                    height:1000px;
                    margin:0 auto 0 auto;
                    display:block;
                    background-color:#C0C0C0;
                }
    
                .lockerContainer
                {
                    width:100%;
                    height:100%;
                    position:absolute;
                    top:0px;
                    left:0px;
                    background-color:transparent;
                    background-color:#000000;
                    opacity:.6;
                    filter:alpha(opacity=60);
                    z-index:20;     
                }
            </style>
        </head>
        <body>
            <div class="outerContainer">
                <div class="mainDiv"></div>
                <div class="lockerContainer"></div>
            </div>
        </body>
    </html>
    
     
    emerson.marini, Jul 3, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Not4u
    Replies:
    9
    Views:
    1,062
    Not4u
    Feb 27, 2004
  2. celineusa@gmail.com

    Nested Div. Height:100%. Does more than 100%

    celineusa@gmail.com, Nov 26, 2005, in forum: HTML
    Replies:
    8
    Views:
    6,740
    Neredbojias
    Dec 9, 2005
  3. Bernd Meier
    Replies:
    6
    Views:
    551
    GTalbot
    Jan 14, 2008
  4. fred
    Replies:
    3
    Views:
    306
    Zifud
    Mar 17, 2005
  5. jononanon@googlemail.com
    Replies:
    5
    Views:
    921
    jononanon@googlemail.com
    Apr 25, 2012
Loading...

Share This Page