more csshenanigans

more csshenanigans

phoenix_r

2009 May 13 • 905
17 ₧
Sooo in my funtime jamzsite I have a footer. I want this footer to extend to the bottom of the page, regardless of how far away that is. Like this:

how to brain? i am have dumb
BOO
 
 
 
2011 Jun 23 at 20:28 UTC
Rockbomb
Dog fucker (but in a good way now)

2009 Nov 14 • 2045
Do you have everything laid out within a table? If so, just make the footer cell stretch to 100%... I think.

Prolly best off waiting for someone who actually knows what they're talking about xD
 
 
 
2011 Jun 24 at 00:50 UTC
phoenix_r

2009 May 13 • 905
17 ₧
Rockbomb said:
Do you have everything laid out within a table? If so, just make the footer cell stretch to 100%... I think.


It's not in a table, it's divcity for the most part. I'm using a table to make some buttonz as per Superjer's suggestion, but none other than that. I was hoping that
code
#footer {min-height: 2em; max-height: 100%;}
would be my jamrock but it most certainly isn't. I also tried setting just the height to 100%.

SRAW said:


lulz, I've never seen LMGTFY, that's pretty good. Srsly though google is the first link in Sunshine Walker's Chain of Help so I've definitely googled the crap out of it. Now that it's crap-free, all that I'm left with is my sorrow and some wrinkled-up handout from high school about keeping your head down and remaining silent...
BOO
 
 
 
2011 Jun 24 at 15:26 UTC — Ed. 2011 Jun 24 at 18:32 UTC
SuperJer
Websiteman

2005 Mar 21 • 6666
You can try setting height:100% on <html>, <body>, and whatever your main div is.

I'm not sure how compatible this is among browsers. In HTML getting picky about height leads to a lot of pain.

You can also try min-height but it doesn't seem to work well for me.
 
 
 
2011 Jun 27 at 22:15 UTC
phoenix_r

2009 May 13 • 905
17 ₧
I thought I had already replied to this but I guess not. Oh well, I present for your reading pleasure for the first time again:

I tried all sorts of combinations of height, min-height, and max-height to no avail. The only solutions I found were either javascript or this one kinda janky CSS hack that didn't do exactly what I wanted - it wouldn't expand up to the bottom of the main content when there was more whitespace above the fold than the min-height of the footer, it only made sure the footer was on the bottom.

I think the more time passes the less I worry about using javascript for compatibility reasons, especially with all of the hot progressive enhancement techniques out there. While ultimately I decided to just draw the fixed-length footer right after the content (even if that means the footer is sometimes in the middle of the page with hella whitespace below it), I would have employed javascript if I was hellbent on this sweet-ass design feature.

Thanks!
BOO
 
 
 
2011 Jun 29 at 21:48 UTC — Ed. 2011 Jun 29 at 21:49 UTC
Page [1]