Jump to content

Cant get footer to stay on the bottom of the container


Recommended Posts

I have been learning php following tutorials, but im stumped. In the video he is able to have the container use a code to place the footer on the bottom of the site

 

Here is the code he used

 

body {
    background-color: #C4C4C4;
    
}

#header {
    background-color: #898989;
    width:  800px;
    color:  #FFFFFF;
    font-size:  18pt;
    border: 1px solid #000000;
    
}

#container{
  overflow: hidden;
    
}
#navigation {
    background-color: #454545;
    width:  179px;
    float: left;
    margin-bottom: -32767px;
    padding-bottom: 32767px;
    border-left: 1px solid #000000;
    border-right: 1px solid #898989;
    
}

#nav_div{
    padding: 10px;
    
}

#con_div{
    padding:  10px;
    
}
#content {
    background-color: #DDDDDD;
    width:  620px;  
    float: left;
    margin-bottom: -32767px;
    padding-bottom: 32767px;
    border-right: 1px solid #000000;
    
    
}
#footer {
    background-color: #898989;
    width:  800px;
    color: #FFFFFF;
    font-size: 12pt;
    border: 1px solid #000000;

    
    
}

 

 

Here is the link to his video

 

 

You didn't ask a question, so it's hard to know what the problem is.

 

That said, if you are looking for a stickyfooter (one that sticks to the bottom of the page if there isn't enough content to push it down, but sits below all the content if there IS enough content to push it down), then this one works well: http://www.cssstickyfooter.com/

 

    margin-bottom: -32767px;

    padding-bottom: 32767px;

 

You shouldn't use crazy codes like that, because there are much more semantic solutions. For all types of fixed and sticky footers, with simpler codes than cssstickyfooter.com offers, even if I say so myself, see Create a Fixed ('Sticky') Footer with CSS

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.