Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q1298 How can I resize an existing layer?

You are here: irt.org | FAQ | DHTML | Q1298 [ previous next ]

In Netscape Navigator 4.x you can't resize the layer by adjusting the width or height attributes. You could use the resizeTo or resizeBy methods, but this appears just to clip the layer, it doesn't re-render the text within the layer.

What you can do is use the load method to load another page into the layer, *and* at the same time give the layer a new width

<script language="JavaScript"><!--
function myResize(o,x,y) {
    if (document.all) {
    else if (document.layers) {

<body onLoad="myResize('myLayer',100,200)">

<span name="myLayer" style="position:absolute">
original content in here


©2018 Martin Webb