Expand footer to bottom of page, if nessesary

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
I want the grey footer's height to expand to the bottom of the page, if the content does not reach down all the way. I know they have ways for a fixed height footer to stick to the bottom but that's not what i need.
 

Attachments

  • Aviary localhost Picture 1.png
    Aviary localhost Picture 1.png
    106.7 KB · Views: 228

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
in that case, I don't really have a simple answer ready.
 

marshian

New Member
Messages
526
Reaction score
9
Points
0
I don't know of any easy way to do this, but I don't like giving up... ;)
Do you know how to work with negative margins?
I'd try to give your main content element a height of 100% and using a negative top and bottom margin to make place for header and footer. If that works you still *might* have to add in a couple of tweaks to make it appear the way you want it, but that might just do the trick.

EDIT:
Or did I just misunderstand you too? Do you really want to make the entire window grey if the content isn't big enough? :\
I don't think that'll look too good...
You could use almost the same trick to achieve this. Give the footer a giant height (eg. 10000px) and then add a negative margin. Say your footer should be at least 100px, then add a margin-bottom of -9900px.
 
Last edited:
Top