Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Balanced text wrapping in HTML

In HTML, is there a way to evenly distribute text that is broken across multiple lines?

E.g., I don't want:

   Here is some really long label that ends up on
   two lines.

I'd prefer:

                  Here is some really long label 
                      that ends up on two lines.
like image 776
Tony the Pony Avatar asked May 25 '10 21:05

Tony the Pony


People also ask

What is wrapping in HTML?

Definition and Usage The wrap attribute specifies how the text in a text area is to be wrapped when submitted in a form.

How do you force text wrap in CSS?

You can force long (unbroken) text to wrap in a new line by specifying break-word with the word-wrap property. For example, you can use it to prevent text extending out the box and breaking the layout. This commonly happens when you have a long URL in the sidebar or comment list.

How do I align text around an image in HTML?

jpg” ALIGN=”right” />This text flows on the left. You can even flow text around an image placed on the left side of the page and then make the text wrap around a different image placed on the right side. In this instance, the break element <B /> and its one attribute, Clear, come into use.


1 Answers

Adobe has proposed that a new css property be added text-wrap: balance.

In the meantime they have created a jQuery plugin named balance-text to achieve the same result.

like image 107
Andy Avatar answered Oct 02 '22 07:10

Andy