Flash z-index bug in Firefox

Today I needed to make a drop-down menu work over a page which had flash content. I searched around a bit and quickly came up with John Oxton’s post on how to do that. So I stuck in the wmode parameter and leaned back in my chair as I tapped F5. Except it didn’t actually work. Hmmm.

To cut a long story short, after much head-banging of the frustration rather than heavy metal variety, I discovered this was due to a bug in Firefox. Basically, if you have absolutely positioned elements inside an element which has overflow: hidden, the absolutely positioned elements will not appear over the flash content, regardless of z-index. The solution is, of course, to set overflow to visible and find another way to do what you were trying to achieve with hidden.

Here is a test for this bug. I have verified that this affects Firefox on Windows and doesn’t affect IE. Flash z-index doesn’t work on Firefox/Linux whatever you do because wmode isn’t supported on that platform yet. I don’t know how Firefox/Mac is affected – if anyone wants to let me know in the comments that would be great.

Posted on Thursday, July 12, 2007.

14 Comments on Flash z-index bug in Firefox

  1. Hi Jon,

    I’ve just tested this for you on Firefox for Mac – I can confirm that setting overflow to visible will position the element on top of the flash content, with overflow:hidden causing it to drop behind the flash.

    Safari 2 displays the element on top of the flash in both instances.

  2. Cheer Mark :) One of these days I need to get a Firefox nightly and see if it has been fixed…

  3. I can confirm that z-index works fine on Firefox on apple mac and safri, opera

  4. Hallo Jon,

    I’m working on a project with this problem – I was wondering if you found a workaround? Setting overflow:visible isn’t a realistic option for me, but perhaps you found a suitable way to replicate overflow:hidden?

    thanks, Pei

  5. Wondering if you found a solution for this?I am working on Firefox and Lunix and I am not able to display popup on top of flash.

  6. This still seems to be a problem in Firefox. Does anyone know of a good work around?

  7. On firefox/linux you juste have to display your div after swf was embed, with javascript.

  8. Very helpfull… hopefully will work for me! I’m stuck with this problem :) thanks!!!

  9. This is fixed in Firefox 3, but they are not auto-suggesting upgrade yet, so it will be some time before the the majority are on 3. Currently I see about 1/3 of Firefox visitors using 3, which is pretty good considering it has only been GA for a few weeks. I have also seen this problem in Camino on Mac.

    One less workaround to be concerned with in the near future I hope…

  10. I DENY that this works in Firefox 3 / PC… sorry. One day Firefox will fix this yes? PLLLLLLLLLLEAAAAAAAAAAASEEEEEEEEEEE for the love whatever idol you worhship – fix it now!!!

    ;-) Peace y’all.

  11. Is should probably clarify I’m using Firefox 3 version 3.0.1, Flash 9,0,124,0

    I can’t upgrade either of these at this point – Big Cheese IT Dept reacts slowly.

    If it does work for you, please provide accurate version specs so we all know when/if they fixed it?

  12. Firefox 3 version 3.0.1, Flash 10 – works fine.

    Firefox and Flash Player 9 were not friends.

  13. I realize this article is nearly 2 years old, but I’m having the same problem today – 06/16/09. Drop down over Flash works fine in FF Mac, Safari, IE 7, IE 8, but does NOT work in FF Windows v.3.0.8.

  14. Geoff, I’m having the same problem you are. All browsers are working except for Firefox 3 on PC. Find a fix yet? I’m even using the iFrame hack for IE 6 and 7, but it doesn’t resolve the Firefox 3 (PC) issue.

Post a comment

You may use Textile for formatting.