Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube iframes sitting on top of fixed position element in Chrome

In chrome youtube iframes float on top of my fixed position header. I've tried setting z-indexes for both and its not happening.

Anybody know a fix for this?

like image 629
Ryan Tuosto Avatar asked Aug 14 '11 02:08

Ryan Tuosto


1 Answers

When you embed a youtube iframe like this:

<iframe width="560" height="315" src="http://www.youtube.com/embed/FSHDDteCBXw" frameborder="0" allowfullscreen></iframe>

The default wmode will make the video overlay everything else, the solution is just add ?wmode=opaque in to the end of the src="http://www.youtube.com/embed/FSHDDteCBXw"

like this:

<iframe width="560" height="315" src="http://www.youtube.com/embed/FSHDDteCBXw?wmode=opaque" frameborder="0" allowfullscreen></iframe>
like image 193
You knows who Avatar answered Oct 14 '22 04:10

You knows who