Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I add the z index?

    How do I add z index so this always stays on top?

    Code:
    <div class="fb-like" data-href="www.website.co.uk" data-send="false" data-width="450" data-show-faces="false"></div>

  • #2
    sac
    sac is offline
    New Coder
    Join Date
    Oct 2011
    Location
    London, UK
    Posts
    12
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Hi,

    in the css style part or file, you can try something like that:

    Code:
    .fb-like {
    z-index:1;
    }
    please note that the value of z-index depends of the number of layers you have so it can be more than 1.

  • #3
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Simple as that! Except it doesn't cure my problem.

    The like button opens a balloon when clicked which is under the element beneath it on the page.

    I set the z to 9999, but doesn't help. What else could I try? It's at dplsolar.co.uk

  • #4
    Regular Coder
    Join Date
    Aug 2011
    Location
    U.S.A.
    Posts
    233
    Thanks
    2
    Thanked 48 Times in 48 Posts
    First, z-index has nothing to do with the number of layers you have.
    Secondly, z-index only works on relative and absolutely positioned elements. If your element is not positioned like that, the z-index won't matter.

    Third, if the like button is in a separate parent container than the other element, there is some finagling you will need to do. This site is an interactive example of how z-index works with positioned elements:

    http://tjkdesign.com/articles/z-inde...ents_stack.asp
    WordPress Designer and theme developer. KlongDesigns - helping bloggers and non-technical folks claim their space on the internet.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •