Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

justify and center aligning are exclusive

If I align my paragraphs with this CSS...

p{text-align: justify}

...then all my previously centered text becomes left aligned.  Of course, if the text is not contained within a "p" tag, then it is not affected.

This is a problem with exclusive alignment properties.  Center and justify should be able to co-exist, but cannot.

Is there something simple I am missing to get around this?  If there's a solution, perhaps a future version of CityDesk could make use of it.

(One solution is to drop the justify alignment!)

Matthew Doucette
Wednesday, August 11, 2004

do you have a link to the page?

Joel Goldstick
Wednesday, August 11, 2004

Define a class, called, say, Justify.

.Justify {    text-align: justify; }

And then

<p class="Justify">

Will Justify just that paragraph.
Wednesday, August 11, 2004

The link to my page is:

I know I could just justify certain "p" tags, but then the problem would be to make CityDesk do that for *all* my "p" tags except the centered ones.

Matthew Doucette
Thursday, August 12, 2004

Oops, you can't see what I am talking about on my main page.  Look at this article instead:

The minesweeper pictures should be centered.

Matthew Doucette
Thursday, August 12, 2004

*  Recent Topics

*  Fog Creek Home