Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to do CSS3 boxshadow on 2 sides of a div?

How to do CSS3 boxshadow on 2 sides of a div?

Problem

Please take a look at this simple code:

http://jsfiddle.net/kerp3/

The box has an inner Box Shadow o all 4 sides. I need the box shadow to only appear on the left and bottom sides.

How to change this code:

box-shadow: inset 0 0 9px 0 #000;
Problem courtesy of: TK123

Solution

Does this help, this should work cross browser.

.shadow {

    -moz-box-shadow: 3px 3px 4px #000;
    -webkit-box-shadow: 3px 3px 4px #000;
    box-shadow: 3px 3px 4px #000;
    /* For IE 8 */
    -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000')";
    /* For IE 5.5 - 7 */
    filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#000000');

}

Here is the original author : http://robertnyman.com/2010/03/16/drop-shadow-with-css-for-all-web-browsers/

Solution courtesy of: r0ast3d

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

How to do CSS3 boxshadow on 2 sides of a div?

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×