For something like this:
What would be the most effective way to do this? Best to do an image, or is there a way to achieve this with CSS without a bunch of hacks/extra markup that I dont know about?
Also the shadow only has to work in IE9, FF, and Chrome
You would do so using pseudo-elements and the box-shadow
property. I have done up an example for you here: http://jsfiddle.net/joshnh/NWnXw/
This works in IE9 and up.
/* Shadow */
.shadow {
box-shadow: 0 1px 5px hsla(0,0%,0%,.25),
inset 0 0 50px hsla(0,0%,0%,.05);
position: relative;
}
.shadow:after,
.shadow:before {
bottom: 7px;
box-shadow: 0 10px 15px hsla(0,0%,0%,.25);
content: '';
height: 50%;
left: 7px;
max-width: 300px;
position: absolute;
right: 7px;
z-index: -1;
-webkit-transform: skew(-15deg) rotate(-8deg);
-moz-transform: skew(-15deg) rotate(-6deg);
-ms-transform: skew(-15deg) rotate(-6deg);
-o-transform: skew(-15deg) rotate(-6deg);
transform: skew(-15deg) rotate(-6deg);
}
.shadow:after {
-webkit-transform: skew(15deg) rotate(8deg);
-moz-transform: skew(15deg) rotate(6deg);
-ms-transform: skew(15deg) rotate(6deg);
-o-transform: skew(15deg) rotate(6deg);
transform: skew(15deg) rotate(6deg);
}
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