You are here: irt.org | FAQ | DHTML | Q1387 [ previous next ]
Netscape Navigator 4.x does use the CSS width and height values to constrain the width of the layer, but not the height, and it doesn't use the full width if the content is narrower than the requested width.
You can get the width using:
document.layer[layerid].clip.width.
For height you'll need to use a table within the layer, e.g.:
<body onLoad="alert(document.div0.document.height + ' ' + document.div0.clip.width)"> <div id="div0" style="position:absolute; visibility:visible; height:300px; width:500px;"> <table height="300" width="500" border="1"><tr><td valign="top"> blah, blah, blah </td></tr></table> </div>