2

I looked at other questions regarding z-index issues in stack overflow and I was not completely understanding the concept of adding information to the end of the URL of the youtube URL ... I couldnt figure out where to begin adding wmode or why I would add that ... i just want them to NOT flow over my navigation at the top of the page ... could someone recommend a fix for my youtube videos as I use embedded youtube videos extensively on my website and having z-index issues looks amateurish and I would rather have my videos running below my nav bars if that is at all posssible. I tried setting a div and dropping the z-index but I either did it wrong or that is not a definitive fix. Help would be appreciated the URL that I am having issue with is at ... http://www.nicholaslawson.com/youtube.com ... thank you for your time.

Erith
  • 69
  • 1
  • 8

2 Answers2

7

It's a very simple fix. But add: ?wmode=opaque to the end of the url. for instance:

http://youtube.com/embed/IdG0e5h3re

would become

http://youtube.com/embed/IdG0e5h3re?wmode=opaque

i had the same issue a while ago!

Fixz
  • 96
  • 3
  • You have 2 question marks in there, the 2nd one should be an & – Andrew Brock May 01 '12 at 19:36
  • andrew brock was asking me to do something that would have only resulted in my practical demise as a human being ... but i mean no disrespect ... – Erith May 01 '12 at 19:39
  • Yes, but generally embed youtube videos use: http://youtube.com/embed/[idgoeshere]?wmode=opaque so there is never a 'second' question mark – Fixz May 01 '12 at 19:40
  • yeah your method worked soundly ... i tried to click the answer button but i havent leveled up my stack overflow points enough to join the guild ... with full membership ... so i am still watching my abilities in your software grow as i participate ... what is this run by the masons? – Erith May 01 '12 at 19:46
0

This is the code i used to embed a youtube video recently

<iframe width="640" height="390" src="https://www.youtube.com/embed/PlkWVkpP59U?rel=0&amp;modestbranding=1&amp;wmode=transparent" frameborder="0" allowfullscreen=""></iframe>

the ID PlkWVkpP59U is the only part you should need to change to change the video.

You can then treat the iframe as a normal element with z-index and whatever, although things typically just work once you do this

Andrew Brock
  • 1,374
  • 8
  • 13
  • dude ... practically speaking ... how did you get that line of URLage, i straight up am not going to perform surgery on 30 youtube videos ... how did you manifest that lovely line of code generatively if you dont mind my asking or did you happen to hand code that yourself? – Erith May 01 '12 at 19:37
  • @Erith yeah, I did that by myself, and the database fills in the bit it needs to – Andrew Brock May 01 '12 at 19:39