Tepken Vannkorn
Tepken Vannkorn

Reputation: 9713

box-shadow to support IE7 and IE8

I use the following css code to help support box-shadow in IE7 and IE8:

 zoom: 1;
 filter: progid:DXImageTransform.Microsoft.Shadow(Color=#4a4a4a, Strength=1, Direction=0),
    progid:DXImageTransform.Microsoft.Shadow(Color=#4a4a4a, Strength=1, Direction=0),
    progid:DXImageTransform.Microsoft.Shadow(Color=#4a4a4a, Strength=1, Direction=90),
    progid:DXImageTransform.Microsoft.Shadow(Color=#4a4a4a, Strength=1, Direction=180),
    progid:DXImageTransform.Microsoft.Shadow(Color=#4a4a4a, Strength=1, Direction=270),
    progid:DXImageTransform.Microsoft.Chroma(Color='#ffffff');

But it slows the performance in IE. But After doing some googling, I found ie-css3.htc which I think would be better than the above code. According to the instruction, I have added some style to my block element:

 zoom: 1;
 z-index: 9999;
 position: relative;
 behavior: url(ie-css3.htc)

which here is my directory structure:

css/
      - style.css
      - ie-css3.htc
js/
images/
ie-css3.htc
index.html

I also place the ie-css3.htc in my site root according to the documentation. However, this does not help anything. I think that I must have made something wrong.

Any help would be very much appreciated.

Thanks

Upvotes: 1

Views: 705

Answers (1)

John Conde
John Conde

Reputation: 219804

Make sure the path to your htc file in your CSS is correct in all situations:

 behavior: url(ie-css3.htc)

should be

 behavior: url(/css/ie-css3.htc)

Upvotes: 2

Related Questions