Solved

CSS Drop Shadow in IE on 3 sides

Posted on 2010-09-18
4
944 Views
Last Modified: 2012-05-10
I'm trying to figure out how to put a drop shadow around 3 sides of div (top, left and right side).

I'm currently using the following which works in FF/Safari but not IE.

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

0
Comment
Question by:swaggerking
  • 3
4 Comments
 
LVL 2

Expert Comment

by:kostantinos1995
ID: 33710425
Well, I tried this and it works in IE 8:
<style type="text/css">
.shadow {
      -moz-box-shadow: 0px 0px 8px 3px #666;
      -webkit-box-shadow: 0px 0px 8px 3px #666;
      box-shadow: 0px 0px 8px 3px #666;
      /* For IE 8 */
      -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=-45, Color='#666')";
      /* For IE 5.5 - 7 */
      filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=-45, Color='#666');
}
</style>

<div class="shadow" style="border: 1px solid #CCC; width: 300px; height: 200px; background-color: white;">
Some stuff
</div>

Open in new window

0
 
LVL 2

Expert Comment

by:kostantinos1995
ID: 33710436
Also change you can change Color='#666' to Color='#666666' as there is some kind of a problem with it.
0
 
LVL 2

Accepted Solution

by:
kostantinos1995 earned 125 total points
ID: 33710443
You can check this article to make it look the same in all browsers:

http://placenamehere.com/article/384/CSS3BoxShadowinInternetExplorerBlurShadow
0
 

Author Closing Comment

by:swaggerking
ID: 33736900
This worked for me. Much appreciation.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now