I have a div rotated 45 degrees. In the div I have a paragraph tag with text rotated -45 degrees so it will be horizontal level. However, when I try to use text align center it throws the text off to the right. How do I center the text horizontal and vertical in a rotated div?
Nevermind. I found the answer here: https://css-tricks.com/centering-in-the-unknown/
Using the “ghost” element inside the parent that is 100% height — method which is the last example on the page of how-to accomplish this. Works perfect.
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘CSS’ is closed to new topics and replies.