I have been trying text to go in a vertical direction like we can do in ms-word tables but so far I have only been able to do THIS... which I am not happy with because it's a box rotated... Isn't there a way to have actual vertical direction text?
I only set the rotation to 305 degrees in the demo which doesn't make the text vertical. 270deg
will but I only made the demo to show rotation.
This works as well:
Best solution would be to use
writing-mode
writing-mode: vertical-rl;
https://developer.mozilla.org/en-US/docs/Web/CSS/writing-modeIt defines whether lines of text are laid out horizontally or vertically and the direction in which blocks progress.
It has good browser support, but will not work on IE8 (if you care about IE) http://caniuse.com/#feat=css-writing-mode
The other answers are correct but they led to some alignment problems. On trying out different things this CSS piece code worked perfectly for me.
To rotate text 90 degrees:
Also, it appears that the span tag can't be rotated without being set to display:block.
Alternative approach: http://www.thecssninja.com/css/real-text-rotation-with-css