[Help] Floating Footer

Discussion in 'JavaScript' started by xrvel, Sep 27, 2010.

  1. #1
    I want to make a floating footer, which stats as the page scrolls.
    My current code is like this
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    #floating_banner_bottom {
    background-color:#FFFF99;
    color:#FF0000;
    text-align: center;
    width: 100%;
    bottom: 0px;
    margin-bottom: 0px;
    height: 106px;
    position: fixed;
    z-index: 100;
    right: 0;
    _position:absolute;
    _top:[removed]document.body.scrollTop+document.body.clientHeight-this.clientHeight);
    }
    html>body #floating_banner_bottom { margin-bottom: 0px; bottom: 0 }
     
    #floating_banner_bottom div.close {
    margin: 0 auto;
    width: 728px;
    height: 16px;
    text-align: right;
    }
    </style>
    
    Read more: http://www.articlesbase.com/programming-articles/how-to-make-floating-bottom-banner-without-javascript-926977.html#ixzz10nXo4pSe 
    Under Creative Commons License: Attribution</head>
    <body>
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    aaaaaaaaaaaaaaaaaaaaaasdasd asdasdasda sdasd<br />
    <div id="floating_banner_bottom">
    	Naaaaaaaaaaaaaaaaaaaaaaaaaaa
    </div>
    </body>
    </html>
    
    HTML:
    It works on latest chrome & firefox.
    But it does not work on IE 6. Can anyone help me? Thanks.
     
    xrvel, Sep 27, 2010 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Cash Nebula, Sep 28, 2010 IP