Search code examples
cssfacebookfacebook-like

Fb like button z-index issue


I have a fb like button on my website but when a user clicks on the button the the pop up comments box is hidden behind the two elements (#centre and footer) and the user can do nothing with it.

My question is, How do I change the z-index of the flyout so when a user clicks the like button it appears in front of other elements?

I have looked at these questions and implemented their answers with no luck in fixing the issue:- facebook iframe App: Send/Like button z-index issue

Other fixes I have found that did not work were:-

  1. Elements that appear in front of/around the flyout should have overflow: visible; set. (From fb developers FaQ page.)

  2. Changing the z-index of the classes that are listed in the answer from the link above.

  3. Changing the width and z-index of a class generated by the iframe, and located in a script tag, called _56z-

All I would like is the flyout to appear on top of all elements on the page without having to change the layout.

Here is the link to my site http://mikelonsdale.co.uk

Thank you for your time and help.


Solution

  • Change the z-index for your #centre and #footer div's to negative values. This should fix the problem.

    Don't forget to change all of the other elements in relation to your site. You will be moving the #centre div to at least to z-index: -2 (to allow room for the #footer div to fit in at -1).