Does anyone know how to make text align top-to-bottom in a div.
SO won't even let me demonstrate it . . . I just want the letters to stack on top of each other in a vertical line down the page like the stories of a building. Was hoping I didn't need to do it with an image.
NJCodeMonkey's answer was close.
For me I had to use
word-break
. It's a little different fromword-wrap:break-word;
So it would look like this.
HTML:
CSS:
This worked for me in Firefox 24, IE 8 and IE 11.
To make the letters top-to-bottom while keeping their normal orientation, like this:
F
O
O
HTML:
CSS:
word-wrap allows words to be broken in the middle, so this will make the letters top-to-bottom. It's also really well supported: https://developer.mozilla.org/en-US/docs/CSS/word-wrap
Depending on your font size, adjust accordingly:
Html:
Css:
Having your text run along vertical lines WITHOUT HACKS
writing-mode
CSS
writing-mode
attribute lets your text run vertically.text-orientation
If you don't want non-vertical-writing letters to rotate themselves in vertical lines, you may use CSS
text-orientation
attribute as well.