Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Bad footer

  1. #1
    New Coder
    Join Date
    Dec 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Bad footer

    hello, my footer is stuck in the up of the page while i want it down and within the frame.

    see rowik.net for page
    see here for stylesheet

    thanks

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Try this
    Code:
    html {
    height:100%;
    }
    
    body {
    margin:0;
    font-family:"Trebuchet MS";
    background-image:url(/img/back.gif);
    /*background-color: #009;*/
    background-repeat:repeat;
    color:#009;
    padding:0;
    height:100%;
    }
    
    #adsense {
    width:125px;
    float:right;
    margin:1em;
    }
    
    a {
    color:#006;
    }
    
    a:hover {
    color:#F90;
    text-decoration:none;
    }
    
    .titre {
    font-size:20px;
    }
    
    .fauxlien {
    display:none;
    color:#666;
    text-decoration:underline;
    }
    
    #frame {
    width:800px;
    background-color:#FFF;
    margin:auto;
    border:#006 solid;
    border-width:0 5px;
    min-height:100%;
    position:relative;
    }
    
    #contenu {
    padding:1em 2em;
    margin:0 165px 0 0;
    }
    
    #footer {
    border-top:#006 2px solid;
    padding:0.5em 0;
    background-color:#cdf;
    position:absolute;
    width:100%;
    text-align:center;
    bottom:0;
    left:0;
    }
    To learn more read this: http://bonrouge.com/2c-hf-fixed.php

    You will need to add a bottom padding to your content equal to or greater than the height of your footer.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Dec 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    works perfect! i dont understand nothing but it works! thanks a lot

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I didn't change much. I just made the html and body a height of 100%. I put a min-height which reminds you will need to add
    Code:
    * html #frame {
    height:100%;
    }
    to your CSS so it works in IE as well.

    I made #frame position:relative so #footer would be centered, then I used absolute positioning on the footer.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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