Home | Samples

Moveable fixed elements

The position of the menu and the buttons depends on the size of the window.

They move to stay just to the right of the content and at the top and bottom of the window.

When the window is scrolled, they stay put.

This works with Mozilla/Firefox and almost in Opera 7.11 (the buttons don't move with the bottom of the window).

Internet Explorer fails because it can't do fixed positioning.

In Opera >7.54 the menu and buttons disappear off the right of the screen because they position relative to their containing element, not relative to the viewport. Since they also inherit their horizontal position from their parent as they should, the result is that they are twice as far to the right as they should be.

New version (simpler and works in Opera) used in my business and personal pages.

Source code follows (see source alone):