How to stop embedded videos overlapping a fixed position title

I have added several videos on YouTube with a fixed title, and they overlap when scrolling. I do not have this problem with any other content.

I tried zindex and it does not work with position: fixed elements. I also tried typing wmode: transparently into the embed tag, and that didn't work either

Any help would be greatly appreciated

+3
source share
1 answer

Try adding &wmode=transparentat the end of your YouTube URLs. See if that helps.

** change:

?wmode=transparent &wmode=transparent ( url / '?'). , jQuery:

<script>
$(document).ready(function(){
   $('iframe').each(function(){
      var url = $(this).attr("src");
      if(url.indexOf("?")>0){
         $(this).attr("src",url+"&wmode=transparent")
      }else{
         $(this).attr("src",url+"?wmode=transparent")
      }
   });
});
</script>

NB: jQuery script - , -: http://www.scorchsoft.com/news/youtube-z-index-embed-iframe-fix

+7

All Articles