HTML CSS Reference/CSS Attributes and Javascript Style Properties/text justify

Материал из Web эксперт
Версия от 08:19, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"text-justify" Example

    
<html>
<body>
<div style="width:300px; 
            height:30px; 
            background-color:beige; 
            text-align:justify; 
            text-justify:inter-word">
This sample paragraph is justified.
</div>
Outside the "justify".
</body>
</html>



"text-justify" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<address>                       <blockquote>                  |
|                |<body>                          <center>                      |
|                |currentStyle                    <dd>                          |
|                |<dir>                           <div>                         |
|                |<dl>                            <dt>                          |
|                |<fieldset>                      <form>                        |
|                |<hn>                            <hr>                          |
|                |<legend>                        <li>                          |
|                |<listing>                       <marquee>                     |
|                |<menu>                          <ol>                          |
|                |<p>                             <pre>                         |
|                |runtimeStyle                    style                         |
|                |<table>                         <td>                          |
|                |<th>                            <tr>                          |
|                |<ul>                            <xmp>                         |
+----------------+--------------------------------------------------------------+



"text-justify" Possible Values

Possible Values
auto                         The default; the browser determines the alignment
distribute-all-lines         Justify all lines of text
inter-cluster                Justify text that does not contain 
inter-word spacing
inter-ideograph              Justify ideographic text
inter-word                   Justify by increasing space between words, but not 
                             the last line in the paragraph
kashida                      Justify by increasing the length of the characters; 
                             applies to Arabic texts
newspaper                    Justify by increasing or decreasing space between 
                             words and letters



"text-justify" Syntax and Note

Note:
How to justify the text. 
Syntax:
    
element { text-justify: value }
elementID.style.textJustify = "value"
document.all.elementID.style.textJustify = "value"