How to fix z-index in YouTube iframes

January 25th, 2012 by Danele Leave a reply »

Ever noticed how the highest possible z-index gets assigned to embedded Youtube iframes? It cases a real headache if you have a modal popup on the page, as the popup, which should obviously be on top of the page contents, sits underneath the iframe.

Here’s how to fix it – simply add ?wmode=transparent to the video URL.

<iframe type="text/html" width="520" height="330"
src="http://www.youtube.com/embed/videoURL?wmode=transparent"
frameborder="0"></iframe>
Advertisement

Leave a Reply