opensoul.org

Firefox + Mac + Flash + CSS opacity = peek-a-boo

I came across a fun browser bug this morning that I thought I would share. You can’t have a semi-transparent element cover a Flash animation Firefox on the mac.

I had a popup menu that used CSS opacity to make the menu semi-transparent. It was working fine, but then we threw in a Flash header and the Flash would hide any time you moused over a menu item.

Here are some screenshots that demonstrate the bug. The first is how it looks in Safari, the second demonstrates the bug in Firefox, and the third shows Firefox if I remove the opacity attribute from CSS.

!/assets/2007/4/26/menu_safari.jpg (Menu in Safari)!

!/assets/2007/4/26/menu_firefix_bug.jpg (Menu in Firefox showing bug)!

!/assets/2007/4/26/menu_firefox.jpg (Menu in Firfox)!

The solution: for now, I’ll just have to live without semi-transparent menus (but they looked so good).

I would venture to guess that this is intentional behavior by Firefox. Since Firefox isn’t a native Cocoa app, it doesn’t have access to all the fancy OS X rendering, so it can’t render transparent elements over elements that it doesn’t have control of (Flash), and it just removes the Flash.

bug, CSS, css, firefox, flash, and mac April 26, 2007

12 Comments

  1. Slack Slack April 26, 2007

    Interesting. Did you check it in camino?

  2. Brandon Brandon April 26, 2007

    Good point. Camino does the same thing as Firefox, so maybe my theory is wrong and it’s just a bug.

  3. Matt King Matt King April 26, 2007

    I experienced this myself. The site was fine with transparent menus until they wanted to have headlines replaced in-line with Flash headlines. In Firefox on Mac it completely trashes the headlines. But the client wanted the Flash headlines and transparent menus, so they decided to let those Mac people on Firefox suffer. I like it when clients are flexible like that!

  4. Lalit Shandilya Lalit Shandilya April 27, 2007

    I had similar experience working with Firefox on Mac; using Thickbox to showcase Flash Videos inside an Ajax window, because of CSS opacity.

    Then I came across Jake Olsen post on CSS Opacity and Flash Transparency in Mac Firefox

    He recommends using transparent png for Firefox Mac instead of CSS opacity. It worked for me.

  5. SympathaticSock SympathaticSock August 14, 2007

    I cant use a png because the site I’m working on has 2 flash objects on top of each other. they fade in and out by adjusting the opacity with javascript. They only solution I found is removing the type property from the embedded object.

    FF will still fade, and in safari at least the object won’t disappear as it does when you do have

    type=“application/x-shockwave-flash”

    in the embed tag.

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>


    Safari Flash & Opacity test


    click here

  6. Zach Dennis Zach Dennis October 26, 2007

    I just hit this today. Thanks for posting! ;)

  7. Liam Egan Liam Egan December 17, 2007

    I ran into this problem today with a website I’m producing. Interestingly, Safari on OSX Leopard seems to exhibit similar buggy behavior while Safari 2 and 3, pre Leopard are fine. I’m going to have to say that it’s more a bug with the flash plugin (perhaps in it’s interaction with cocoa) than it is with the browsers in particular.

  8. Chris Chris December 19, 2007

    Possible solution to this problem is to server different CSS for the audience viewing the website on MAC (FF and Camino)

    Its cumbersome but atleast Users wont suffer.

  9. iGuide iGuide January 16, 2009

    Hm, this is a frustrating one to fix, because its either all-or-none for browsers. One solution is to use PNG-24’s to create the opacity, and then use conditional comments for IE6 which doesn’t understand PNG-24 opacity. There are 2 possible IE6 fixes, either using MS background image filters, or doing it without the PNG and adding a MS opacity filter.

  10. Arpita Arpita February 17, 2009

    Hi All,

    I am facing issue in Mac safari browser.

    I made this flash and the background is following mouse.
    http://www.designurimagination.com/Projects/russia/russia-new2.html

    It is fine in all browsers but when i see it in MAC+safari it has error. The moment you click outside browser and come back to the browser thebackground disappear. I tried all the solution I know till date.

    Can anyone help me understand the real problem? Please let me know the solution.

    thanks
    Arpita

  11. Tison Tison June 4, 2009

    If anyone is using thickbox, on a mac with firefox:

    Thickbox 3.1 has addressed this issue and it is fixed in the code. HOWEVER, don’t forget to download (and properly link up) the png image that is referenced within the thickbox stylesheet!

    Get the png here: http://jquery.com/demo/thickbox/thickbox-code/macFFBgHack.png

  12. Hungary Hungary December 27, 2009

    An interesting solution to that problem!
    Rather original buy frankly speaking I don’t have such troubles when using Mozilla.

Post a Comment

Comments use textile. Anonymous comments will be deleted.

My name is Brandon Keepers. I like to build things, usually in Ruby or JavaScript. I work at GitHub and live in Holland, MI.

Popular Posts