position:fixed for All Browsers

[SmartMenus 6 add-on]

SmartMenus 6 supports fixed positioning in all modern browsers that support it natively. However, there are some exceptions which include Internet Explorer<7 on all platforms, browsers powered by Gecko prior to 20030312 (Mozilla<1.3) and iCab 3. In these browsers any menu tree that has "fixed" position set will appear as absolute-positioned by default.

If you would like to make these browsers emulate fixed positioning for any menu tree, you can use the following small add-on script.

SmartMenus 6 Add-on: position:fixed for All Browsers

Example

Just scroll the page and you will see how the main menu will not be scrolled with the rest of the page.

Usage

Using the add-on is really simple - just link the small JS file on your page after the link to the SmartMenus script core (c_smartmenus.js) file. This is all you need to do - the add-on script will automatically find any menu tree that has "fixed" position set in the configuration file and will do its job (i.e. emulate fixed positioning for any menu tree in the browsers that do not support it natively with SmartMenus 6).

Notes

Please note the following when using this add-on:

  1. Fixed positioning in the browsers that do not support it natively (mentioned above) is JavaScript emulated. This means that this add-on will not function for the users of these browsers that have JavaScript support disabled.

Download this sample

You can download the complete example or just see the configuration file and the images used for it.

Configuration file