Make fancybox on top

I set the image link using fancybox, but when I click on the thumbnail, the fancybox window appears behind all my content. I use z-index to place other content on the page, so I think I need to do the same for fancybox, but I don't know where to place the css code?

+5
source share
3 answers

Fancybox has its own CSS file, and you must search #fancybox-wrapand modify its z-index'es. But in any case, it has pretty high default settings (1101 on mine), so I would suggest changing your own HTML / CSS.

Just in case, check to see if you have added this fancybox stylesheet to your HTML.

+4

, WordPress 4.1 Fancybox, CSS:

div#fancy_outer {
z-index: 1000000;
}
+1

I added:

.fancybox-overlay {
    z-index: 1000000 !important;
}

in my stylesheet for the latest version of fancybox.

+1
source

All Articles