An object must have a position declaration in order to be moveable.
"position:relative" means that an object flows along with other objects in the normal way,
whereas "position:absolute" takes an object out of the browser's document flow scheme.
This file shows the basics of moveable objects. The key points are:|
1. The two moveable objects are an image (IMG) and a DIV containing some text.
2. Both objects have names, so that they can be referred to elsewhere (in this
case by the onClick event handling code in pushbuttons)
3. Both objects have in-line style sheets, which declare "position:relative".
The image and red text are relatively-positioned objects. Use the buttons to move the them around. The effect is the same as if you'd declared a relatively-positioned object with initial offsets (using the top and left STYLE attributes). The object will reflow if you resize the browser, but always leaves a 'hole' where it would naturally have been.