I have a div which I rotate inside a container. I have not been able to get the rotated div to “stick” to the left-most side of the container. Please see this fiddle to see what I mean.
I have a div which I rotate inside a container. I have not been
Share
You need to set the
transform-origin(-webkit-transform-originand so on) totop left, and addtranslateX(-100px)after the rotiation (so like this:transform: rotate(-90deg) translateX(-100px)). Otherwise you are rotating around the center point (set a background on the rotated element and you’ll see).Side-note, make sure the filter isn’t applied in IE9 (use a conditional comment), because otherwise both will be applied and the result is a black box.
Updated fiddle