[thelist] get available window width (must be cross browser compatible)

aardvark roselli at earthlink.net
Wed Oct 22 11:13:00 CDT 2003


> From: "Scott Blanchard" <octigonuser at hotmail.com>
>
> I have a text area whose height and width I want to maximize according
> to the available horz & vert space left (after toolbars and buttons,
> which have a fixed height).
> 
> Can someone tell me the best way to do this in a standards compatible
> manner?

standards-compliant, or cross-browser?

without seeing what you have, did you try a width:100% style?

alternatively, you can work the width and height off the available 
window sizes and remove the fixed width items to set a width:

height: expression(document.body.clientHeight - 50);

...where this little bit of IE-friendly CSS/script sets the height  to 
match the window minus 50px.

i also have an all-script solution that i know works in N6+ and IE6+, 
because that's what i've used it in, but it's too big to paste... i can 
send offlist if you wish...



--
my latest book project:
  Web Graphics for Non-Designers
  http://www.amazon.com/exec/obidos/ASIN/1590591712/evoltorg02-20
  ISBN: 1590591712


More information about the thelist mailing list