user1269625 user1269625 - 4 months ago 25
CSS Question

CSS box-shadow on all four sides

I have this class here and I using box-shadow which works fine, but it only shows the shadow on 2 sides, is there away to get the shadow on all four sides?

Thanks,
J

.contactBackground{
background-color:#FFF;
padding:20px;
box-shadow: 10px 10px 10px #000000;
}

Answer

If you set the offsets to zero, the shadow will be equal on all four sides.

.contactBackground{
    background-color:#FFF;
    padding:20px;
    box-shadow: 0 0 10px #000000;
}