I am trying to implement a Comodo trust logo on my site. It is an image that when you mouse over it, it pops up an iframe with some security info about the site. The code to do this comes from a third party.
The problem comes when the logo is near a relatively positioned image. The image shows up on top of the iframe. If I remove position:relative; from my footer image, the iframe shows up on top of the image. I can’t just remove relative positioning though, because it throws off the look of the rest of the page.
I’ve distilled the issue into a jsFiddle HERE.
The trust logo is injecting a
divinto the page with az-indexset to 0, so essentially it’s being placed behind everything else (including your image).Changing the
z-indexto any other positive integer will change theiframe‘s stacking order and place it on top of the image (as long as its higher than your image’sz-index, which is 1 unless explicitly set).Adding this to your stylesheet should do the trick (assuming that logo always generates a
divwith the same ID):Note that the
divcontaining the frame has itsz-indexset via an inline style, so you will need to make sure that’s overridden properly.