HTML and CSS Reference
to resize and move a window object. The window can be moved or resized absolutely, or
relative to its current position or size. The numbers, given as arguments, are the pixel
coordinates, and are listed in Table 10.7.
Table 10.7 Move and Resize Methods
What It Does
Moves the window relatively by 20 pixels.
Moves to the top, left corner of the screen.
Resizes the window relatively by 15 × 10 pixels.
Resizes the window absolutely to 450 × 350
<head><title>Move a New Window</title>
winObj.moveTo(0, 0); // Move window to top left corner
parent.window.moveTo(215, 0); // Move the parent window
parent.window.resizeTo(400,400); // Resize browser window
For directions to our new place,
click the button
<p>When you are ready to close the window, click here</p>