Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to have text in div fill a triangle shape?

I'm trying to have a block of text in a div fill a downward triangle shape. Is there any way to achieve this with either CSS or Javascript?

This is for a site in which users can dynamically insert text. I'm trying to avoid the alternative method, which is to have them insert text line by line with a limit on each line.

like image 236
theNewman Avatar asked Sep 14 '25 04:09

theNewman


1 Answers

I don't know of any simple way to do what you are asking for. The best thing I can think of would be to use something like the CSS text wrapper, which can fit your text to any shape. I haven't used it myself so I don't know what problems you will run into.

like image 194
Elias Zamaria Avatar answered Sep 15 '25 17:09

Elias Zamaria