I rotated a div with Text & wanted to Place it on the left top. I managed to place it at the top, but I can't get it working to align with the left edge. How do I do this?
.credit {
position: absolute;
background-color: pink;
transform: rotate(-90deg) translateX(-50%);
}
<div class="credit">
Picture by Name
</div>
Change the transform-origin to
top left
and make the translation-100%