Stop YouTube Videos from Hiding Your Menus – Two Methods

Stop YouTube Videos from Hiding Your Menus – Two Methods

image

Has putting YouTube videos on your website embarrassed you by being so bold as to insist on being in front of other elements on your website? This is a common problem seen across the Internet daily. However, just ‘cause main people suffer from this ailment doesn’t mean that you have to. The resolution to this problem doesn’t rely on setting Z-Index or anything fancy, just making some small changes to the original code provided by YouTube to embed the video.

The preferred method these days for embedding a video appears to be to <iframe> in the video. This is clean, simple, and more importantly, won’t get stripped out like the embed code or javascript embeds by most WYSIWYG editors that people use online to edit their content. A normal IFrame call would look like this:

while the corrected HTML code would look like the following:

With the inclusion of 18 characters, you’ve solved  a big problem. And who said the keyboard isn’t mightier than the sword? Hmmm… nobody I’d guess.
image

But if you are screaming at your monitor now “Hey, I use Object tags rather than Iframe. What about me?” I have the solution. It is going to entail setting the wmode=transparent again but this time, it will involve a little more work. Here is a sample embed snippet from Google:

whereas the corrected code would look like this:

Note the include of the <param name=”WMode” value=”transparent”></param> after the opening <object> tag and the inclusion of the wmode=”transparent” parameter/value in the <embed> tag. This is the secret sauce to help hold YouTube videos at bay so they don’t take over the universe… Ok, at least they won’t take over your site.

Got any other, better ways to address this? Please feel free to leave a LEGITIMATE comment using the form below. As always, Spammers Need Not ApplySM.

Stalk Me...

Michael Gibbs

I'm a technologist at heart, assisting companies best utilize the Internet to market themselves and sell their products and services online. This includes organizations as large as Google and as small as one or two individuals.
At Over The Top and Exhibit A Communications, I've programmed solutions for Google as well as at least one other company that was later acquired by Google.

I've been CTO of an Internet SaaS company and spent my time pretty evenly between guiding the future technical strategy of the company, architecting software solutions for my dev teams, designing and running a data center to service our clients world-wide as well as being a technical evangalist/sales engineer to our media clients large and small.

I've also been Chief Photographer of the Daily Sun/Post newspaper back when it was a 5-day a week daily newspaper.

I also spent a great many years as a beach lifeguardfor the City of San Clemente as well as Jr. Lifeguard instructor and then as it's program coordinator.
Bragging rights
Private Pilot with Instrument rating and proud husband of soon to be 25 years (and counting).
Stalk Me...

Latest posts by Michael Gibbs (see all)

Leave a Reply