Force Justify

#1

Is there a way to force justify in css?

0 Likes

#2

text-align:justify;

0 Likes

#3

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

0 Likes

#4

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

0 Likes

#5

So you mean this?

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

You probably don't but explain better.

0 Likes

#6

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>
</div>

On another note this Google result is very impressive - 3rd one down I get this thread 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

0 Likes

#7

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.

0 Likes

#8

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.

0 Likes

#9

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

0 Likes

closed #10
0 Likes