Code Snippets Gallery
Text Rotation
.rotate {
/* Safari */
-webkit-transform: rotate(-90deg);
/* Firefox */
-moz-transform: rotate(-90deg);
/* Internet Explorer */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}The example above rotates text 90 degrees counterclockwise.
The rotation property of Internet Explorer’s BasicImage filter can accept one of four values: 0, 1, 2, or 3 which will rotate the element 0, 90, 180 or 270 degress respectively.
Could i say rotate something in IE by say 5 or 10 degrees?
Yes, but you would have to use javascript in ie6.
This thread has a lot of info on it.
However, I use jQuery for this, as there is a very nice plugin.
In fact you don’t have to use javascript for this to work in IE, you could use IE’s matrix filter!
Great man, it will also work for Images, we can use for rounded corner images to rotate the one single image.
Thanks, this is just what I needed.
You did forget Opera: -o-transform:rotate(90deg);