resize a layer in real-time

Sharky Forums


Results 1 to 2 of 2

Thread: resize a layer in real-time

  1. #1
    Reef Shark chronicle's Avatar
    Join Date
    Jan 2002
    Location
    NYC, NY, USA
    Posts
    311

    Arrow resize a layer in real-time

    Hi

    I want to resize a <div> layer like if I click on a link or an image the <div> layer will resize, from like width="200" to width="300". Do you know any way of doing this?

    thanks
    CS

  2. #2
    Hammerhead Shark Tekime's Avatar
    Join Date
    Dec 2001
    Location
    Falmouth, ME
    Posts
    2,347
    That'll require the use of JavaScript; namely, the OnClick handler, to change the width style of the object.

    You'll need to specify an object ID for your DIV:

    Code:
    <div id="myDiv">....</div>
    And you can access the style of that DIV through JavaScript handlers like onClick, onMouseOver, etc.

    In this case, the property to change would be 'myDiv.style.width'. Search on www.google.com if you can't put it together. If you really have a hard time drop another msg back here.

    Happy coding
    Stuff and stuff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •