I have a div and inside I place an image using the IMG tag
More stylesheets In, I used the background image for that div and aligned the center with z-pointer value 1.
And I want to z-index value-100
for IMG in that div, so I hope the background image to come in front of the image ..
I think I am doing something wrong
My code is
. Video-thumb {height: 72px; Width: 120px; Background: #ffffff; Background Image: URL ('http://doamin.com/images/play.png'); Background repeat: do not repeat; Background position: center; Padding: 4px; Limit: # ECEA1 PX solid; Margin: 0 auto; Z-index: 2; } .video thumb img {z-index: -100; } & Lt; Div class = 'video-thumb' & gt; & Lt; A href = \ "somthing.php \" & gt; & Lt; Img id = 'thumb' width = 120 height = 72 src = 'http: //domain.com/image1.jpg'> & Lt; / A & gt; & Lt; / Div & gt;
This will only happen if the image was not inside the div. Because the image is inside the divi, in fact there will be a z-index relative to the other elements, which are siblings (in the same basic element).
Just adding the above point, z-index applies only to display elements: complete; Applying to them and even if this was the case, you are not going to get an image to display behind the backdrop of its original element.
Comments
Post a Comment