Fog Creek Software
Discussion Board




Justified text

Why there is no button for "justifying" text in CityDesk, like there are buttons for left/right/center alignment?

Manish Bansal
Sunday, April 25, 2004

In the Olden Days (the Really Olden Days) web browsers supported left-, center-, and right-aligned, but not justified. As far as I know plain old HTML doesn't even support right-justified text; you can do it with CSS now.

Joel Spolsky
Fog Creek Software
Sunday, April 25, 2004

If yoy want justified text (paragraphs) insert this line into your CSS document.

p { text-align: jusify; }

Peter Monsson
Monday, April 26, 2004

Almost ;)

_
Monday, April 26, 2004

Plain old HTML does allow justification without resorting to CSS.

See:
http://www.htmlhelp.com/reference/html40/block/p.html

(I think Netscape/IE 4 and up will display justified text with this attribute.)

Avrom Finkelstein
Monday, April 26, 2004

In WebObjects there are buttons for justification, and I
could have got it right in browser when my app was running.

The problem where edit boxes. I couldn't set them to
justify numbers to the right. Does right justified
edit box exist in HTML?

VPC
Monday, April 26, 2004

They Do in CSS: http://www.w3.org/TR/CSS1#text-align

Peter Monsson
Tuesday, April 27, 2004

Do enough people even still use browsers that don't support justified-text via CSS?

Ilya Haykinson
Friday, May 07, 2004

I'm mystified why anyone would want justified HTML text in the first place. Browsers don't do kerning or automatic hyphenation and microspacing like typesetting applications do. Justified text without such corrections looks ugly and is harder to read than non-justified text.

Chris Nahr
Saturday, May 08, 2004

Sad but true ... mostly.  Safari has an option to use ATSUI.  I think Mozilla was trying to use ATSUI, too.  So at least some browsers, with some configuration, can do kerning and ligatures.

Automatic hyphenation appears to be at least a proposal for some version of CSS.  So maybe we'll have that before too long, too.

(I used to wonder why text systems didn't always just use Knuth's TeX algorithm for flowing text.  The answer isn't performance, it turns out.  Some Gnome hackers tried adding this to their text editor, and it turns out that reflowing an entire paragraph after every line typed drives users crazy.  So you can't do it everywhere.  But web browsers should be ok, since they're [mostly] read-only.)

anon
Monday, May 10, 2004

*  Recent Topics

*  Fog Creek Home