height= "100%"

Out of context: Reply #16

  • Started
  • Last post
  • 29 Responses
  • xrusos0

    laypersons explanation:
    basically, if you want to force a height in all browswers, put a transparent image in your site, 1 pixel wide and 1000pixels tall (if you want to force 1000 pixel height for all pages)

    since you don't want to force all pages to 1000 pixels, make the height attribute a javascript variable. (by using the script i pasted earlier)

    then you subtract the height of things like headers (if the transparent gif is below them), and there you have it... a site with a forced height of at least "n" pixels

    this works great for sites that are heavy in content, except for a few pages that look dinky because there isn't much content. this way there is a minimum height despite the lack of content.

    is that better?

View thread