SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Height in IE6

  1. #1
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Melbourne
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Height in IE6

    http://www.revo.com.au/misc/lite/

    I have read various articles and still cannot find a way to make the footer stay down the bottom without overlapping the content. If you test in Mozilla and Opera it works fine.

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Hi,

    Use the code from one of my sites, www.altra.com.au. I would explain, but no time now.

  3. #3
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Melbourne
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, getting closer. I'll keep at it.

  4. #4
    SitePoint Member
    Join Date
    Nov 2003
    Location
    Melbourne
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I still can't get it. :/

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,781
    Mentioned
    99 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    You have the height auto before the height 100% in the css which will negate the auto and implement 100% and the element will overflow.

    You also have set a 100% height to content and given it padding as well which will also make it too big in ie. Fortunately mozilla won't inherit 100% any more than one level down so it collapses the height.

    Have a look at my FAQ sticky thread which explains 100% height and also how to place a footer in detail.

    Anyway here's your code amended so it works

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
    <head>
    <title>revo.com.au</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    html, body {
    	height: 100%;
    }
    body {
    margin: 0px;
    padding: 0px;
    background: #505F73 url('http://www.revo.com.au/misc/lite/i/container.gif') repeat-y 50% 0;
    font-family: Tahoma, Verdana, Arial;
    font-size: 12px;
    color: #5C7791;
    text-align:center;
    min-width:700px;
    }
    div, td, p { 
    font-family: Tahoma, Verdana, Arial;
    font-size: 12px;
    color: #5C7791
    }
    #container {
    min-height: 100%;
    width: 700px;
    margin-left: auto;
    margin-right:auto;
    position: relative;
    text-align:left;
    }
    * html #container {height: 100%}
     
    #content {
    padding: 16px 12px 25px 12px;
    }
    #header {
    position: relative;
    left: 50%;
    width: 700px;
    margin-left: -350px;
    padding: 0px;
    height: 113px;
    background: #1F7EF0 url('http://www.revo.com.au/misc/lite/i/header.gif') no-repeat 100% 0;
    }
    #navigation {
    position:relative;
    left: 50%;
    width: 700px;
    margin-left:-350px;
    height: 20px;
    background: #183963;
    border-bottom: 2px solid #FF7E28;
    }
     
    #navigation ul {
    margin-left: 0px;
    padding-left :0px;
    margin-top: 4px;
    display: inline;
    padding-top: 3px;
    }
     
    #navigation ul li {
    display:inline;
    margin-left: 0px;
    padding: 4px 14px;
    color:#FFF;
    list-style:none;
    padding-top: 3px;
    }
     
    #navigation a:link, #navigation a:visited, #navigation a:active {
    color: #AAB3BC; 
    text-decoration: none; 
    border-bottom: 3px solid #183963; 
    font-weight: bold;
    }	
    #navigation a:hover {
    color: #FFFFFF; 
    text-decoration: none; 
    border-bottom: 3px solid #FF7E28; 
    font-weight: bold;
    }
    .nav {
    padding-top: 4px;
    font-size: 11px;
    font-weight: bold;
    }
    #footer {
    position: absolute;
    bottom: 0;
    width: 700px;
    height: 20px;
    background: #183963;
    border-top: 2px solid #FF7E28;
    text-align: center;
    color: #AAB3BC;
    }
    a:link, a:active, a:visited {
    text-decoration: none;
    font-weight: bold;
    color: #FF7E28;
    }
    a:hover {
    text-decoration: underline;
    font-weight: bold;
    color: #FF7E28;
    }
    .button {
    border-top: #C1C8CE;
    border-right: #E0E6EC;
    border-bottom: #E0E6EC;
    border-left: #C1C8CE;
    border-width: 1px;
    border-style: solid;
    background: #FDFDFE url('http://www.revo.com.au/i/button_bg.png') repeat-x top left;
    font-weight: bold;
    color: #1E5A9E;
    font-size: 11px;
    }
    input, .input {
    border-top: #C1C8CE;
    border-right: #E0E6EC;
    border-bottom: #E0E6EC;
    border-left: #C1C8CE;
    border-width: 1px;
    border-style: solid;
    background-color: #FDFEFE;
    background-image: url('http://www.revo.com.au/i/input_bg.png');
    background-repeat: repeat-x;
    background-position: top left;
    background-attachment: fixed;
    color: #0D243D;
    font-size: 12px;
    font-family: Tahoma;
    }
    .list UL { 
    margin: 4px 5px 2px 12px; 
    padding:0px; 
    font-weight: bold;
    }
    .list LI { 
    background: url(http://www.revo.com.au/misc/lite/i/bullet.gif) no-repeat 0px 5px;
    list-style: none; 
    padding: 0px 0px 0px 10px
    }
    .orange {
    color: #FF7E28;
    }
     
    </style>
    <link rel="shortcut icon" href="icon.ico" />
    </head>
    <body>
    <div id="container"> 
    <div id="header"> </div>
    <div id="navigation"> 
    	<div class="nav"> 
    	 <ul>
    		<li><a href="http://www.revo.com.au/">Home</a></li>
    		<li><a href="../services/">Services</a></li>
    		<li><a href="../portfolio/">Portfolio</a></li>
    		<li><a href="../contact/">Contact</a></li>
    	 </ul>
    	</div>
    </div>
    <div id="content"> <strong>Welcome to <a href="http://www.revo.com.au/">revo.com.au</a> 
    	a multimedia development group ready to assist you!</strong>
    	<p>&nbsp;<span class="orange"><strong>Why choose us?</strong></span></p>
    	<p>&nbsp;We offer outstanding services at affordable prices.</p>
    	<p>&nbsp;</p>
    	<div class="list"> 
    	 <ul>
    		<li>Excellent Product</li>
    		<li>Reliability</li>
    		<li>Affordable</li>
    	 </ul>
    	</div>
    	<p>&nbsp;Revo believes in establishing a close relationship with it's clients, 
    	because its the basis of creating a unique design. Having close contacts with 
    	our clients enables us to achieve your vision.</p> 
    	<p>&nbsp;You don't even require any web knowledge, we can help you every step 
    	of the way in reaching your goal. Check out our portfolio page to view some 
    	previous projects.</p> 
    </div>
    <div id="footer"> 
    	<div class="nav"> Copyright © 2004 revo.com.au </div>
    </div>
    </div>
    </body>
    </html>
    BTW you should get rif od those non-breaking spaces and use css to position your elements instead. Also there is no tag in xhtml like this <p />. You must use opening and closing tags on paragraphs.

    Hope the above helps.

    Paul

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •