Rotate an Element to 45° with CSS
Here’s the code to rotate HTML element to 45° using CSS. Previous Explorers can rotate elements to 90°, 180°, 270° and 360°, but they can’t rotate to some 45°. However there are special filters to do it. In IE8 trasform origin is different so I also had to fix things related to transfer origin point. Below CSS which is ready to be used, except IE7 code, which was too ugly, but I’m including this in case you’ll want to use it 🙂
In IE8 the badge is rotating not from the center like in other browsers, but from the top, so I’m moving it back to top, and then returning it to center in IE9. Continue reading →