Footer ok in IE but not in mozilla or opera

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samvb
    New Member
    • Oct 2006
    • 228

    #1

    Footer ok in IE but not in mozilla or opera

    Hi,
    I just checked my homepage against 3 of them and found that footer doesn't dispaly well in mozilla n opera. The code is as follows:


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style>
    #holder {width:95%; margin-left:auto; margin-right:auto; background-color:#fff; border:#CCCCCC 1px solid;padding-bottom:0;}

    #banner {width:100%; height:200px; border:0;}

    #location {background-color:#F4F7FB; color:#000; height:20px; font-size:11px;}
    #location a {text-decoration:none ;}
    #location a:hover {text-decoration:unde rline;}

    #footer {display:block; clear:both;font-size:11px;color :#333333; width:100%; text-align:center; background-color:#00CCFF; height:30px;}
    #footer a {text-decoration:none ; color:#333;}
    #footer a:hover {text-decoration:none ; color:blue;}

    #sitelinks {text-align:right;fon t-size:11px; padding:3px;}
    #sitelinks a {text-decoration:none ;}
    #sitelinks a:hover {text-decoration:unde rline;}

    </style>
    <title>HOMEPAGE </title>
    </head>

    <body>
    <div id="holder">
    <div id="sitelinks"> <a href="#">Access iblity</a></div>
    <div id="header">
    <img src="http://bytes.com/images/logo.jpg" alt="My banner" id="banner"/>

    <div id="menus">
    <ul>
    <!-- CSS Tabs -->
    <li><a href="Home.html "><span>Hom e</span></a></li>


    </ul>
    </div>

    <div id="location">
    You are in: Home
    </div>

    </div><!--END HEADER-->


    <div id="footer">
    Copyright (C) 2010. All rights Reserved.
    <p> | <a href="#">Privac y Policy</a> | <a href="#">Contac t us</a> | <a href="#">Help</a> |</p>

    </div>

    </div>
    </body>
    </html>


    Please see the output for yourself and get back to me.
  • samvb
    New Member
    • Oct 2006
    • 228

    #2
    I tried inserting a div before the footer, with clear:both. but now, the holder div doesn't extend to include the footer? The footer seems to have been out of the main holdin div (.e. "holder")

    P.S. Is there any way to delete posts in bytes?

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      You don't need the 'clear'. The reason the footer doesn't extend is because you set the height to 30px which is too short to hold the content. Remove the height property altogether.

      It doesn't matter how it looks in IE till you get it working in a modern browser.

      No, you cannot delete posts.

      Comment

      Working...