Css height of browser


Is it possible to make the height of a div relative to the browser size?

e.g if the height of the browser is 800px, set my div height to 800px

See the CSS faq on 100% height (link in my sig) and if that’s not what you meant then come back here and post again:)

In addition to reading Paul’s FAQs, which are always very informative, there are some things you must keep in mind.

UNLESS you are giving the DIV position:fixed; or all it’s parent’s are already 100% height of the vierwport ( which has it’s own undesirable side effects, you really can’t achieve 100% viewport height.

Even in Paul’s 100% height demo. It’s a one shot deal. It is useful to structure your markup around this and consider the occasional positioning trick.

It is also useful to know what you are trying to achieve in actuality ( some folks may think they want to make some element fill the full height of the screen … when in fact what they need is equal height columns)