Drop Down Navigation Falls Behind YouTube Video

[edit] Please Note

These docs are now deprecated, we have a new Support area located here

Revision as of 14:52, 17 September 2011 by MrFent (Talk | contribs)
Drop Down Menu behind YouTube

When using Drop Down Navigation, your drop down menus are overlapped by Flash elements, such as an embedded YouTube video on your Feature Slider.

This is because the default behavior for Flash always overlap any sort of HTML attempting to be layered on top of it. Fixing that so that drop down menus appear correctly above the flash requires an easy modification to the way flash videos are embedded on your website. There are two methods of modifying the code, and they depend on whether you are using YouTube's newer iframe code or the older embed code.

YouTube's iframe embed code

Add the following parameter to the embed code:

   ?wmode=opaque

Before:
<iframe width="516" height="380" src="http://www.youtube.com/embed/T6MhAwQ64c0" frameborder="0" allowfullscreen></iframe>

After:
<iframe width="516" height="380" src="http://www.youtube.com/embed/T6MhAwQ64c0?wmode=opaque" frameborder="0" allowfullscreen></iframe>

YouTube's older embed code

There are two parameters you need to add to your embed code.

  1. Add the following directly after your opening "object" tag:
   <param name="wmode" value="opaque"></param>
  1. Add the following within your embed tag:
   wmode="opaque"

Before:
<object width="516" height="380"><param name="movie" value="http://www.youtube.com/v/T6MhAwQ64c0&hl=en_US&fs=1?hd=1&showinfo=0"></param><param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/T6MhAwQ64c0&hl=en_US&fs=1?hd=1&showinfo=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="516" height="380"></embed> </object>

After:
<object width="516" height="380"><param name="wmode" value="opaque"></param><param name="movie" value="http://www.youtube.com/v/T6MhAwQ64c0&hl=en_US&fs=1?hd=1&showinfo=0"></param><param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param><embed wmode="opaque" src="http://www.youtube.com/v/T6MhAwQ64c0&hl=en_US&fs=1?hd=1&showinfo=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="516" height="380"></embed> </object>