Previous Example-|-Next Example-|-Return to Chapter Listing

Example 14.7:
Resizing Layers with resize(), width, and height

[This example works with Netscape Navigator 4. It won't work with Netscape Navigator 2 or 3, or Internet Explorer 3.]

Use the buttons to modify the size of the layer:

This text is in layer1.







Here is our layer: <LAYER NAME="layer1" LEFT=360 TOP=250 BGCOLOR="#ffff00"><BR> <H1>This text is in layer1.</H1><BR> </LAYER> And this is how we resize it: <form> <INPUT TYPE="button" VALUE=" Resize (narrow and deep)" onclick="layers.layer1.resizeTo(50,400)"><br> <INPUT TYPE="button" VALUE=" Resize (wide and shallow)" onclick="layers.layer1.resizeBy(400,20)"><br> <INPUT TYPE="button" VALUE=" Width (narrow) " onclick="layers.layer1.clip.width = '50'"><br> <INPUT TYPE="button" VALUE=" Height (deep) " onclick="layers.layer1.clip.height = '400'"><br> </form>
Previous Example-|-Next Example-|-Return to Chapter Listing