Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical rotation of text inside div

Tags:

html

I have a div which contains two lines but i want to make them show up as vertical.

This is how my div looks like

<div>
 Line One <br>Line Two
</div>

Is there a way to make text orientation inside the div vertical so that it appears like

L L
I I
N N
E E

O T
N W
E O
like image 897
Asdfg Avatar asked Jan 30 '26 21:01

Asdfg


1 Answers

Wrap them both in p tags, and set word-break to break-all, and the width to 1px.

A hacky solution, but one that works!

See this example, otherwise, I don't believe there is a cross-browser solution unfortunately.

like image 180
jacktheripper Avatar answered Feb 02 '26 12:02

jacktheripper