Introduction

This is an example of fixed positioning.

Layout

This example is straight from the CSS2 spec (section 9.6.1) and shows how to create frame-like presentations. This is the main text of the document that's inside of a fixed position scrollable DIV tag.

The header, footer, and sidebar are all done with fixed position DIV tags, too. The header and footer have nested tables that are used to center the text horizontally and vertically.

Fixed positioning

Fixed positioning is a subcategory of absolute positioning. The only difference is that for a fixed positioned box, the containing block is established by the viewport.

For continuous media, fixed boxes do not move when the document is scrolled. In this respect, they are similar to fixed background images. For paged media, boxes with fixed positions are repeated on every page.