This demo demonstrates how to create an endless panning area, pretty much like Google Maps. It relies on the use of 2 nested DIVs: one representing the viewport (or container), the other representing the drawing area (called universe). The drawing area contains all the elements and moves relatively to the viewport. Since the viewport uses the overflow:hidden directive, it limits the amount of viewable items.
Click the icon on the lower right corner and then drag the mouse around the pan the viewport.
Use right click > view source to see the underlying Javascript code.