Invalid Domain

You are here :



Quick Reference:

Javascript Code Library
HTML Cheatsheet
Special Characters
Color Codes
Browser Chart
Stylesheet Guide
Unix Guide

JavaScript Code Library
editor_extensions
Webmonkey Position Layer Behavior
by Taylor

This action positions one DHTML element a specified number of pixels away from another, based on the left, top, right, or bottom of the bounding box of each element. To use it, you must choose the element to position and the element to position against; you must specify which side of each element's bounding box to base the positioning on; and you must supply the number of pixels difference between the two. Optionally, you can choose the browser window as the element to position against by using the string window.

You can specify either a positive or a negative integer for the difference between the two elements. You can also mismatch sides (which can create some interesting effects).

Usage: WM_position2element(elementPositioned, left|top|right|bottom, differenceInPixels, elementPositionedAgainst|window, left|top|right|bottom);

Download the zip file (Windows).

Download the hqx file (Macintosh).

Instructions: Behavior actions are stored in the Dreamweaver application folder, inside Configuration > Behaviors > Actions. Drop the contents of the archive file into the Actions folder and restart Dreamweaver to access them.

SUBMISSIONS
If you have code to share with other Webmonkeys, send it our way.

Can't find something?
Check out the
JavaScript archive