3 replies [Last post]
bogus
bogus's picture
Offline
Regular
Last seen: 9 years 43 weeks ago
Timezone: GMT-5
Joined: 2006-12-04
Posts: 47
Points: 3

My problem is that 100% height is only 100% when there is nothing on the screen. When content is added, 100% becomes 100% height of the viewport plus height of the content. The site always has to be scrolled to see the footer, even if the content is very short.

Is there a way for 100% to actually mean 100%? I just want to place the footer at the bottom of the site, regardless of vertical resolution, but it has to be in the flow so it doesn't obscure content if the vertical res is very low.

Thanks.

bo·gus (bō'gəs)
adj.
Counterfeit or fake; not genuine: bogus money; bogus tasks.
[From obsolete bogus, a device for making counterfeit money.]

bogus
bogus's picture
Offline
Regular
Last seen: 9 years 43 weeks ago
Timezone: GMT-5
Joined: 2006-12-04
Posts: 47
Points: 3

I got it working. A bit of

I got it working. A bit of an odd solution. I set the html/body's top margin to a negative pixel value equivalent to the discrepancy between it's height and the height of the viewport, then I set the inner content to a positive margin in the opposite direction. A highly irregular hack, but I suppose they all are. I'm concerned about stability when I add more content.

[edit] Never mind, doesn't work in any version of IE so that doesn't help.

bo·gus (bō'gəs)
adj.
Counterfeit or fake; not genuine: bogus money; bogus tasks.
[From obsolete bogus, a device for making counterfeit money.]

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 2 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

footerStickAlt

Hi bogus,
You could try the technique explained here:
http://www.themaninblue.com/writing/perspective/2005/08/29/

bogus
bogus's picture
Offline
Regular
Last seen: 9 years 43 weeks ago
Timezone: GMT-5
Joined: 2006-12-04
Posts: 47
Points: 3

Wow, it's like magic. A

Laughing out loud Wow, it's like magic. A thousand internets to you!

bo·gus (bō'gəs)
adj.
Counterfeit or fake; not genuine: bogus money; bogus tasks.
[From obsolete bogus, a device for making counterfeit money.]