jaynesh — 2012-01-10T12:14:09-05:00 — #1
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
paulob — 2012-01-10T12:38:58-05:00 — #2
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:)
dresden_phoenix — 2012-01-10T14:42:47-05:00 — #3
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)