How to keep bottom section (footer) at the very bottom of web page

I am having issues keeping the footer section of my page at the very bottom.  If I increase the screen resolution, the footer does not stay at the bottom, and white appears underneath. I want the footer to always remain on the bottom.  How can this be done?

I've included my demo page for review.  The footer right now is a light blue (#0099FF) and the height will be set to 80.

My demo page contains my style sheet at the very top.

Please advise with mofications to the code how this can be done.  Thank you!

demo.htm
arendt73Asked:
Who is Participating?
 
nap0leonCommented:
Shamelessly stolen from FB's "Chat" box which is docked at the bottom right of my browser.
Works in FF8, Opera 11.6, and Chrome 16
Does not work in IE8
having issues with my Safari 5.1.2 opening.. so not tested there.

Add to your styles
#dockedFooter{
    bottom: 0;
    direction: ltr;
    height: 80px;
    left: 0;
    position: fixed;
    right: 0;
    z-index: 300;
    width:100%;
    text-align:center;
    background-color:#0099FF;
}

Open in new window


remove your existing table row for your footer and add this after your table:
<div id="dockedFooter">Footer content goes here</div>

Open in new window

0
 
COBOLdinosaurCommented:
You are not going to control much of anything using a 20th design like that.  Other than the style sheet that page lookslike something from 1999.

You don't have a valid doctype so you will get cross browser issues.  You are using depreciated attributes that could break the page, and you have everything tied together in layout defined with a table.  You have no control over the footer, or anything else on the page. The table properties determine the position of everything, and the positions will modify with changes in the screen.

You need to come into this century if you want to use modern techniques and support modern browsers.


Cd&
0
 
arendt73Author Commented:
COBOLdinosaur, thanks for your "kind" words.  A suggestion would've been nice. Thanks for the support I paid.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
COBOLdinosaurCommented:
What you paid for was access to information. What you got was information.  If you don't like the information then take it up with the company. I'm a volunteer on this site.  I don't work for the company, and I don't work for you.

As for a suggestion, you got one; modernize the page so it has some chance of supporting what you want to do.


Cd&
0
 
arendt73Author Commented:
What is modernization to you? Use of layers as opposed to tables?
0
 
COBOLdinosaurCommented:
Modernization means standards driven design and development.  The use of a valid doctype to tell the browser what standard to use.  The removal of depreciated tags like font and depreciated attributes like bgcolor; instead moving presentation fully to CSS.  The use of semantically correct tags to define what content is.  It may be that part of the content of the page belongs in a table; if it is tabular data. Obviously the footer does not belong in a table.

With a modern page, layout is manage and control with CSS not HTML, and it might be possible to get the footer where you want it with fix position.  But fix position is most certainly not going to work, in the page you have, in a consistent manner cross browser; or cross version.  Even with a modern page sticking a footer to the bottom is a dicey proposition, because user settings can still break the page.


Cd&
0
 
nap0leonCommented:
Safari 5.1.2 finally opened... verified code above works there too (all Windows XP BTW)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.