Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1387 How can I get the CSS width and height values of a layer in Netscape Navigator 4?

irt.org | Knowledge Base | DHTML | Q1387 [ previous next ]

Q1387 How can I get the CSS width and height values of a layer in Netscape Navigator 4?

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.