...

View Full Version : How do I add the z index?



BigKev
10-28-2011, 11:02 AM
How do I add z index so this always stays on top?


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

sac
10-28-2011, 11:36 AM
Hi,

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



.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.

BigKev
10-28-2011, 11:48 AM
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

resdog
10-28-2011, 02:43 PM
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-index/teach_yourself_how_elements_stack.asp



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum