background
|
|
Games
Ruffnecks Gaming Gaming for everyone
More

Tombstone
Tombstone Tuning Home of tuning, projects and fast cars and boats.
More

Computer
|
|
Up Image
Navigation
Search this Site
Enter your search terms

Site Breadcrumb - You are here
|
Reference   JavaScript Code Library

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');

Usage notes:

  • All arguments must be strings, with the exception of differenceInPixels, which should be a number.
  • You must set width and height for elementPositioned and elementPositionedAgainst.

Requires: WM_checkIn()

Cut, paste, and enjoy!