I've a problem.
I want to add an shadow.jpg image under every image with class ".shadowed".
So:
.shadowed {
border: solid 1px #fff;
margin: 15px;
}
And then we use :after:
.shadow:after {
content: url('images/shadow.png');
}
OK it looks ok, but shadow also gets his parents border, like:
And I want it that way:
So how to avoid :after border inheritance?
I know I could put everything into span and use :first-child border probably, or something like that, but I don't want to, it will mess up my markup.
Or maybe there's another easy way of putting image after image (PHP allowed).
Cheers :)
:before and :after refers to the element's Content not it's border box.. I think you may have do your trick with the wrapping span.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With