Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CSS Drop Shadow in IE on 3 sides

Posted on 2010-09-18
4
Medium Priority
?
956 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

636 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