Gecko Iframe-shim extension

Version 1.0

The Gecko Iframe-shim extension allows you to position menus above Java applets and other embedded media, in Windows or Linux builds of Mozilla 1.1 or later. Thanks to Björn Carlsson for this suggestion.

View the demo to see it in action. It works using the same Iframe shim as Win/IE5.5+ (which is necessary in those browsers to keep menus above <select> elements and other windowed controls).


Download the Gecko Iframe-shim script, copy it into your udm-resources folder, and add the script include to the body section:

<!-- gecko iframe-shim extension -->
<script type="text/javascript"

Then to style the <iframe> you need this CSS:

/* iframe shim styling */
.iframeShim  {

	/* z-index should be (um.orientation[6] + 10) */



There's one parameter in the script - a variable near the top called shadowOffset, which you can use to increase the size of the <iframe> so it also covers the menu's dropshadow layer. This can't happen automatically because the shadow might be offset in a non-pixel unit.

Implementation notes

The script assigns id attributes to menu <ul> elements, which will overwrite any existing ids you may have given them.

Browser notes

This extension is only supported in Windows or Linux builds of Mozilla Gecko browsers 1.1 or later, because:


We would like your feedback! Take the UDM4 Survey!

UDM 4 is valid XHTML, and in our judgement, meets the criteria for WAI Triple-A conformance.