You may have to use transform-origin
however, it depends on how your HTML is structured. Without any code from your side, this may be the closest to what you are looking for:
Using absolute positioning to place your caption text on the top right corner with matching margin (matching with padding you need on container) and then using transform-origin: top right
.
Something like this:
#caption {
position: absolute;
top: 0px;
right: 32px;
-webkit-transform: rotate(270deg);
-webkit-transform-origin: top right;
}
Where container is relative
ly positioned.