English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Is there a javascript function that would fix the wordspacing for every line to fit within a certain width? Rough right text looks horrible to me.

2006-09-18 08:53:52 · 5 answers · asked by Rockstar 6 in Computers & Internet Programming & Design

Ok, I feel like an idiot. You know how many different ways I tried "justified" instead of "justify". I thought the command didn't exist. When the first answerer typed it in, I laughed.... haha oh well. Bully on me...

2006-09-18 09:01:17 · update #1

5 answers

align="justify"

2006-09-18 08:55:47 · answer #1 · answered by words_smith_4u 6 · 0 0

Study and try this,

text


Or if its in a table you can:

text

And that will align it to the left, center, or right. If you want to make the text justified you have to use a style sheet like this:

Your Text


And that will make the text justified on the page. That style also works in a table cell and most other container tags. Here are some other options for the text-align style and the text-justify style:

text-align: left | center | right | justify;

Also look here for more help,

http://www.w3schools.com/html/
http://www.freeprogrammingresources.com/tutorial.html

Have fun but be safe!

2006-09-18 16:22:30 · answer #2 · answered by Anonymous · 0 0

You don't need Javascript. Just

[text]

. Or in CSS, p {text-align: justify;} in your style block will justify all your

elements.

2006-09-18 15:57:52 · answer #3 · answered by injanier 7 · 0 0

Be aware though that perhaps justified text is not supported by the W3C. I was unable to find any reference to it. Maybe if you validate your code you'll end up knowing about it!

2006-09-18 16:11:29 · answer #4 · answered by Diogo Schneider 2 · 0 0

hey buddy !

It's so simple
For any paragraph :

blab blab blab


For any cell in the table :
blab blab blab


It seems I'm still around ha ! :)

2006-09-18 17:33:49 · answer #5 · answered by persicus 2 · 0 0

fedest.com, questions and answers