2

I want to type text from up to down, right to left like the image below. I just search around but didn't find any result that matches my requirement. How can I do that with HTML, CSS, javascript? Thanks!

https://imgur.com/kO7BDbj

Ullas Hunka
  • 1,939
  • 1
  • 12
  • 26
Meo Beo
  • 389
  • 5
  • 14
  • 1
    Possible duplicate of [Vertical Text Direction](https://stackoverflow.com/questions/4264527/vertical-text-direction) – str Jul 26 '18 at 08:12
  • @str no, my question is different. I don't want to show text in p, div or something else. I want to type text in textarea vertically. – Meo Beo Jul 26 '18 at 08:16
  • 1
    have a look at the answer. You can use your div as an editable field. – Ullas Hunka Jul 26 '18 at 08:18

1 Answers1

4

Use text-orientation for the above quest the example is as follows:

.some {
  writing-mode: vertical-rl;
  text-orientation: upright;
  border: 1px solid #000;
  padding: 5px;
  min-height: 50px;
  min-width: 50px;
}
<div class='some' contenteditable=true>
  some text <br>asdasdasdas<br> asdasdasdas<br> asdasdas<br> adasda<br> asdasd<br> adasda<br> adada
</div>

More details on the same can be found here

Ullas Hunka
  • 1,939
  • 1
  • 12
  • 26