I am trying to wrap text in a div using css and/or jQuery such that the bottom line is the longest.
so rather than
__________
|this is |
|text |
|________|
it would say
__________
|this |
|is text |
|________|
I can easily wrap the text using
white-space: pre-wrap;
But i can't find anything that would let me do this.
(one thought i had would be to reverse the text, find where the line wrapping happens, apply a <br/>
in the same places, with the text going forward.. but i dont know how to check where the line wraps)
Their is a plugin in jquery called bacon
With this you can wrap text according to your needs in any shape you want, I know you have to do a stuff over it but I think it may help you .
$(".baconMe").bacon({
'type' : 'bezier',
'c1' : { x : 10, y : 0 },
'c2' : { x : -115, y : 170 },
'c3' : { x : 35, y : 340 },
'c4' : { x : 15, y : 480 },
'align' : 'right'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With