Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8747913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:26:12+00:00 2026-06-13T12:26:12+00:00

For some reason I can’t get absolutely position elements with a z-index set to

  • 0

For some reason I can’t get absolutely position elements with a z-index set to 9999 to appear over my FancyBox with YouTube iframe, even though I have my wmode parameter set to opaque, even the ‘X’ close button:

FancyBox v2.1.3

FancyBox Media v1.0.5

JS:

(function($) {
    $(function() {

        $('#splash-video')
            .fancybox({
                fitToView : true,
                width     : '100%',
                height    : '100%',
                margin    : 10,
                padding   : 0,
                helpers   : {
                    media : true
                },
                youtube : {
                    params : {
                        autoplay : 1,
                        fs       : 1,
                        hd       : 1,
                        rel      : 0,
                        showinfo : 0,
                        wmode    : 'opaque' // this no worky
                    }
                }
            });

        $('.skip-video').on('click', function() {
            $.fancybox.close();
            $(this).remove();
        });

        setTimeout(function() {
            $.fancybox.close();
            $('.skip-video').remove();
        }, 64000);
    });
})(jQuery);

HTML:

<a id="splash-video" href="http://www.youtube.com/watch?v=dQw4w9WgXcQ"></a>
<a href="#" class="skip-video">Skip Video</a>

The above activates my FancyBox which is then click-triggered to appear, while having my .skip-video anchor position over the top, but it doesn’t.

Both transparent and opaque seem to have no effect on any browser; the “X” close button and div are above the YouTube video in Chrome, but literally no other major browser (FF, IE7-9, Opera and Safari).

All in all, I think none of the YouTube params are working.

UPDATE:

It’s working now thanks to Janis‘ help :).
I altered my Fancybox JS to:

$('#splash-video')
    .fancybox({
        fitToView : true,
        width     : '100%',
        height    : '100%',
        margin    : 0,
        padding   : 0
    });

and changed the anchor to:

<a id="splash-video" class="fancybox.iframe" href="http://www.youtube.com/embed/opj24KnzrWo?autoplay=1&amp;autohide=1&amp;fs=1&amp;rel=0&amp;hd=1&amp;wmode=opaque&amp;enablejsapi=1"></a>

Great success!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:26:12+00:00Added an answer on June 13, 2026 at 12:26 pm
    1. Why do you think that none of the params are working? Is your video auto-starting? If you check developer tools, does the iframe source looks like this?
      http://www.youtube.com/embed/opj24KnzrWo?autoplay=1&autohide=1&fs=1&rel=0&hd=1&wmode=opaque&enablejsapi=1
      If yes, then the script works perfectly fine.

    2. I do not know how exactly are you trying to get absolutely position elements to appear over the fancyBox and why it is not working for you, but this works fine for me:

      $(".fancybox")
      .attr('rel', 'gallery')
      .fancybox({
          openEffect  : 'none',
          closeEffect : 'none',
          nextEffect  : 'none',
          prevEffect  : 'none'
      });​
      

      Test case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason I can't detect I can't set a z index for any
For some reason I can't figure out why the nested elements are not appearing
For some reason I can't get this to work. It pulls the name and
For some reason I can't get this script to run when I add the
For some reason i can't get the variable 'total' to define at all... I
I'm new to Javascript and for some reason I can't get the following code
I know PHP 5 already supports SQLite but for some reason I can't get
I'm fairly new to JQuery and for some reason I can't get the currently
For some reason I can't seem to get this particular web page's contents via
For some reason I can't seem to get the basic example to work, provided

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.