Solved

CSS Drop Shadow in IE on 3 sides

Posted on 2010-09-18
4
943 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Help in CSS 5 36
using web browser with BING 40 86
css question 1 32
Text in block not displaying properly 2 13
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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 the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

705 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

17 Experts available now in Live!

Get 1:1 Help Now