Closed MrJoshFisher closed 8 years ago
Could you provide a link please?
Does the element you have given z-index: 1
also have a position
property? Is it possible the other element has a higher z-index
? I can troubleshoot that if you provide a link.
There are no other z-index properties Im using the hvr-trim on some other buttons on the same page and thats working fine, ill email you the details
The border on the hvr-border-fade
effect is inset
, meaning it will appear behind the image. Here's a solution:
.wpb_single_image.vc_align_center {
width: 100%;
padding: 4px;
box-sizing: border-box;
}
The .wpb_single_image
containers in Firefox at least seemed too wide so width: 100%
fixes that. Then, padding: 4px
makes a 4px
gap around the edge so the hover effect can be seen (change 4px to the same width as the border effect). box-sizing: border-box
tells the browser to treat the padding as part of the width so it doesn't exceed 100% width.
Cheers but if I increase the padding it just pushes the image in how would I make the border sit ontop of the image so that it would essentially go ontop of the boarder thats already there like the hvr-trim effect
You'd need to either make the image a background-image, position the image behind using negative z-index
, or place the hover effect in a pseudo-element with a positive z-index
.
Having a slight issue with hvr-border-fade as it doesn't seem to be on top of the image even tho Im using z-index 1;
you can see a faint blue shadow round the box but its not on top of the image, any ideas ?