This guest post was written by V Scott Ellis of Blackbox Technologies, a business that helps companies to maximize their web presence.  If you have WordPress knowledge and are interested in writing a post for WordPress Hacks, please contact us.

One of the more common issues with embedding a flash object on your home page (or any page for that matter) is that if it is near the navigation and you have CSS drop-down menus, then you may find your drop-down menu getting lost behind the flash object. If you haven’t dealt with this before it can feel like a nightmare, but fortunately it’s a pretty easy fix.

The Problem: You have a CSS based drop-down menu in your navigation and a flash element near it the menus may get “hidden” behind the flash object.

The Solution: Set the z-index of the div holding the flash to 1 and the z-index of the div holding the nav to 2.

In the flash element:

Look for the flash <object> tag and add the following code:

<param name="wmode" value="transparent">

You’ll want to insert this code right below the <param name=”quality” value=”high”> tag and include the code wmode=”transparent” in the flash <embed> tag .

Want automatic updates? Subscribe to our RSS feed or
Get Email Updates sent directly to your inbox!
Tweet This | Digg This | Stumble it | Add to Del.icio.us | | Print This

V Scott Ellis

Scott Ellis is a consultant and entrepreneur with a passion for building businesses and improving the way they operate. With several efforts of his own currently underway Scott has set out to help those interested in starting their own businesses to succeed by overcoming the obstacles and unknowns, and applying "big business" principles learned from years of consulting, to small and start-up businesses. In a world where business is ever shifting, it is Scott's goal to help enable anyone who wishes to take their fate into their own hands to be successful. Scott's passion for small business is founded in the understanding that our businesses must evolve along with the our ever changing marketplace, that creativity is key and that simplicity is often far more powerful and effective than complexity. Scott is a Partner at BlackBox Technologies, a leading provider of web solutions from website design and development to business process automation for companies of all size. In his spare time Scott enjoys photography, basketball, running, SCUBA diving, hiking, music and occasionally sleeping! He has a Bachelors in Psychology from Purdue University and is a native of Indianapolis, IN.

There Are 14 Responses So Far »

  1. Luanigio says:

    Great!
    I go immediately to try these tips.
    Thank you and happy new year.

    Ciao.

  2. Shirley says:

    Hmmm. I don’t think that this solution is cross-browser compatible. I played around with a similar thing this past fall and had a problem with ‘Safari 2′. Surprisingly, it worked on every single browser (including IE flavors) as well as Safari 3, but not Safari 2.

  3. Shirley says:

    Yeh, here’s my article that I published on the subject back in September…

    http://www.velvetblues.com/web-development-blog/safari-and-flash-dont-play-well-together/

    I couldn’t find a solution.

  4. Shirley says:

    No follow up? (Sorry for the persistence. :-) )

  5. Ryan says:

    @Shirley I wasn’t aware that Safari 2 couldn’t handle the overlays. I don’t think it’s a huge issue though as Safari 2 is such a rarity these days.

  6. Thanks for the useful menu article. I am searching for the same solutions. Thanks anyway.

  7. mindless says:

    Is it just me and my bad luck? Ive found this solution in other places and it doesnt work for me… plus now my nav bar is all screwed up in IE. has anyone else had this not work? is there another solution somewhere? Its driving me crazy.

  8. Shouldn’t z-indexed elements have to be absolutely, fixed or relatively positioned and into the same parent in order to them elements interact with each other?

    If your elements are under different parents, the parents will determine the z-index that will determine the stacking.

  9. Jimmy says:

    Thank you so much!, super straight forward and perfectly helpful for my situation.

    Thank you again Great JOB!

  10. Jim says:

    Thanks so much!! this is exactly what i needed and fixed my problem perfectly!!

  11. phani says:

    hello sir,

    i have already done all the things that were mentioned here..but still the flash is hiding my navbar in safari 4 browser only,…its working fine in ie8, ie7, mozilla 3.5 latest,,,and chrome,.,but am not able to find any solution for safari 4…

    really appreciate ur help
    thank u

  12. Ryan says:

    I’ve tried this and it doesn’t work for me in IE8 or Firefox 3.5 – it works ok in IE7, not sure why!

  13. mani says:

    i am having the same problem that my drop down menus are hiding the featured content slider…but i am unable to understand the solution given above …coz i am really a starter in wp …can any body plz explain a bit for me ….plzz

  14. Dont wokr says:

    Doesnt work in Firefox 3.5 or IE8

Trackbacks/Pingbacks »

Tweetbacks »

Leave a Reply