Demonstration of how to achieve fixed positioning with both Internet Explorer and Firefox for DHTML JavaScript Menus.

Note that this is purely for demonstration purposes only and is not supported by Milonic in anyway.

Please use this technique with caution and expect to cause problems

This method ONLY works in Firefox and Internet Explorer and has not been tested on any other browser.

It also only works with menu version 5.743 or higher


As you can see, the menu sits at the top at position left:30, top:36 - As you scroll down the page the menu remains in a static (fixed) position.

In order to get this to work you need a DOCTYPE such as this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

You then need to declare CSS such as:

<style type="text/css">
body
{
overflow-y:auto;
padding:0 10px 0 10px;
height:100%;
margin:0;
border:0;
}
</style>
<!--[if lte IE 6]>
<style type="text/css">
/*<![CDATA[*/
html {overflow-x:auto; overflow-y:hidden;}
/*]]>*/
</style>
<![endif]-->



This helps fool Internet Explorer into leaving the menu in the same position regardless of scrolling.

However, it also does the same thing with other objects if you declare a position.








































JavaScript Menu Powered by Milonic