Skip to content
Some pithy Javascript for beautiful justified text


Sweet Justice: beautiful justified text.

Include this file at the bottom of your pages
and it will hyphenate and justify your text.
The script pays attention to elements with
any of these three CSS classes:

  sweet-justice:  Hyphenated and justified
  sweet-hypens:   Hyphenation only
  justice-denied: No hypens or justification.
                  This is useful for child nodes.

Hyphenation is accomplished by inserting soft
hyphen characters (0x00AD) into long words.

Requires either jQuery or YUI3.


"This is just terrible."
   -- globally_unique_id

"A nice idea, but unusable."
  -- eleven3

"honestly i'm glad the web doesn't have great
support for justified text"
  -- jawbroken

BSD license: Share and enjoy.
@author 23 April 2010

Something went wrong with that request. Please try again.