Force Justify

Is there a way to force justify in css?


You might want to look here and look at what values you can put.

I know about the text-align: justify - but force justify is where a short sentence, say 3 or 4 words, is forced to the width of the container - now that would be cool

So you mean this?

<div id=“wrapper”>
<p>3 or 4 words</p>

You probably don’t but explain better.

Yeah - probably not explained well - but I’ve been searching and I don’t think there is a cross browser, solid solution

<div id=“wrapper”>
<p>You probably don’t but explain better.</p>

On another note this Google result is very impressive - 3rd one down I get this thread :slight_smile:

I’m not sure what the rules are linking to other forums, but in the second result is a thread which references this site as an example of forced justification which works in ie but not FF

If it is part of a CSS3 recommendation most browsers don’t have full support for that, most don’t even have support for it so you just have to wait a little bit.

Justification of text on the web is not recommended - it can create “rivers of whitespace” which makes the text very hard to read - especially if someone is using larger or smaller text than you imagine. Justification just about works for print but definitely not for the web.

You could fake that by forcing a linewrap with the help of an additional inline element.