By default, YUI manages the z-index of everything that extends YAHOO.widget.Overlay and uses the overlap panel. This is done using the YAHOO.widget.Overlay "bringToTop" method. You can disable this by simply changing the "bringToTop" method to an empty function:
YAHOO.widget.Overlay.prototype.bringToTop = function() { };
This code will disable it forever, and you can simply put it at the end of the container.js file. I believe that this approach will be too large than the sledgehammer method, so we extend the YUI classes and after calling "super.constuctor" we write:
this.bringToTop = function() { };
If you do this, you are essentially telling YUI that you will manage the z-indexes of your elements yourself. This is probably good, but something to consider before doing this.
source share