Click to See Complete Forum and Search --> : "short pages" and stretching backgrounds


KDLA
01-12-2009, 08:37 AM
Example: link (http://162.114.55.86/cpm.shtm)
When the pages are short, the body background does not stretch to meet the bottom of the screen (in FX). How can I fix this with minimal (structural) coding changes?

Jick
01-12-2009, 10:42 AM
Maybe try adding position:absolute;bottom:0; to the footer section?

KDLA
01-12-2009, 11:57 AM
Won't that overlap the content of pages that are longer than what's displayed on the screen?

KDLA
01-12-2009, 02:07 PM
body, html{min-height:100%}
I was able to come up with this solution. Does anyone know of problems this could cause?

Jick
01-12-2009, 02:11 PM
If you put a bottom margin on the bottom of the main content section that is as tall as the footer I think you could avoid that scenario. But, I'm not 100% sure. You'd have to do some playing around to see how well that works.

Jick
01-12-2009, 02:12 PM
Whoops! Posted at the same time. :p

Anyway, one issue with min-height is IE doesn't support it. Well, I'm not sure about newer versions of IE but I know at least IE6 and older don't support it.

KDLA
01-12-2009, 02:20 PM
Whoops! Posted at the same time. :p

Anyway, one issue with min-height is IE doesn't support it. Well, I'm not sure about newer versions of IE but I know at least IE6 and older don't support it.
Believe it or not, IE6 stretches the background without help; so, if it ignores the "min-height," no problem - it's doing what I want anyway (which is scary: me and IE6 on the same wavelength!!:eek:).

Jick
01-12-2009, 02:24 PM
Wow! That is strange!

Ha! Isn't it funny how we find it odd when IE does something we actually want it to do. :p