Make HTML content area fit viewport height?

I just did this demo, extracting what I am trying to accomplish:

alt text http://ilove4d.com/autosize.png

I want the pink / yellow area to act according to these rules:

  • The minimum height is the size of its content (which is variable). The IF content is smaller than the viewport size.
  • Otherwise, the minimum height is such that it adjusts to fill the window.

Checking the source for this demo, what am I missing? I feel like this is a pretty simple case that shouldn't require javascript.

Any ideas?

+2


a source to share


1 answer


You need to implement correct html / css to work with sticky footer, take a look here: http://ryanfait.com/sticky-footer/



+1


a source







All Articles