Search code examples
csswordpresssticky-footerhtml

nested div 100% height with sticky footer


I have a #main div nested within a container div that I want to fill the page down to the sticky footer. I've tried several angles, but can't seem to get it to work. If you don't use firebug, just ask and I'll provide CSS, etc.

Thanks.

site: http://www.dentistrywithsmiles.com


Solution

  • I've tried to do sticky footer many times and I never seem to learn that they are really hard to do. Your situation seems complicated and what you have now doesnt seem half bad.

    I think I would use JavaScript to detect page resize and adjust the heights appropriately. Either that, or do something tricky with background images spanning both the footer and #main.

    That's probably not what you want to hear but this is a tough problem for only using CSS - tougher than I would care to invest in.