1

I want to rotate an element in browsers including IE8. For all other browsers execpt IE8 I can do: <vendor>-transform: rotate(-45deg)

For IE8 I know I have to use -ms-filter: "progid:DXImageTransform.Microsoft.Matrix but I'm unsure what matrix manipulations to set. My matrix brain is kind of rusty.

Anyone?

Geert-Jan
  • 18,623
  • 16
  • 75
  • 137
  • possible duplicate of [CSS rotate property in IE](http://stackoverflow.com/questions/4617220/css-rotate-property-in-ie) – Spudley Mar 26 '14 at 15:50
  • @Spudley: no. I asked specifically for tha matrix-manipulation for -45deg. That's not covered there. – Geert-Jan Mar 26 '14 at 16:17
  • 1
    Well, the answer you've accepted for 45deg is identical to the answer I gave there, so....? In any case, one of the other answers in that question links to a transform calculator that would also give the answer. And my suggestion use the CSS Sandpaper lib would allow you to use standard syntax with degrees rather than a matrix transform, which frankly is a much better idea anyway. – Spudley Mar 26 '14 at 16:25
  • ahh my bad, didn't read the answers there, only the question – Geert-Jan Mar 26 '14 at 17:04

2 Answers2

4

You can use this matrix generator to help : http://www.boogdesign.com/examples/transforms/matrix-calculator.html

this one is as well very helpfull : http://www.useragentman.com/IETransformsTranslator/

G-Cyrillus
  • 101,410
  • 14
  • 105
  • 129
3

This should do it:

-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)";
HaukurHaf
  • 13,522
  • 5
  • 44
  • 59