HTML CSS Reference/CSS Attributes and Javascript Style Properties/direction — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 08:19, 26 мая 2010

"direction" Example

    
<html>
<body>
<input type="button" 
       onclick="myDiv.style.direction=event.srcElement.value;" 
       value="rtl"> 
<input type="button" 
       onclick="myDiv.style.direction=event.srcElement.value;" 
       value="ltr"> 
<div id=myDiv 
     style="background:aqua; padding:10px;" class="explanations">
Level is Level. </div>
</body>
</html>



"direction" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <acronym>                     |
|                |<address>                       <b>                           |
|                |<bdo>                           <big>                         |
|                |<blockquote>                    <body>                        |
|                |<button>                        <caption>                     |
|                |<center>                        <cite>                        |
|                |<code>                          <col>                         |
|                |<colgroup>                      currentStyle                  |
|                |<custom>                        <dd>                          |
|                |defaults                        <del>                         |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |<dt>                            <em>                          |
|                |<embed>                         <fieldset>                    |
|                |<font>                          <form>                        |
|                |<hn>                            <i>                           |
|                |<img>                           <input type="button">         |
|                |<input type="checkbox">         <input type="file">           |
|                |<input type="image">            <input type="password">       |
|                |<inputtype="radio">             <input type="reset">          |
|                |<input type="submit">           <input type="text">           |
|                |<ins>                           <kbd>                         |
|                |<label>                         <legend>                      |
|                |<li>                            <listing>                     |
|                |<menu>                          <nobr>                        |
|                |<object>                        <ol>                          |
|                |<option>                        <p>                           |
|                |<pre>                           <q>                           |
|                |<rt>                            <ruby>                        |
|                |runtimeStyle                    <s>                           |
|                |<samp>                          <select>                      |
|                |<small>                         <span>                        |
|                |<strike>                        <strong>                      |
|                |style                           <sub>                         |
|                |<sup>                           <table>                       |
|                |<tbody>                         <td>                          |
|                |<textarea>                      <tfoot>                       |
|                |<th>                            <thead>                       |
|                |<tr>                            <tt>                          |
|                |<u>                             <ul>                          |
|                |<var>                           <xmp>                         |
+----------------+--------------------------------------------------------------+



"direction" Possible Values

Possible Values
ltr            The default; left to right
rtl            Right to left
inherit        Direction is inherited from container element



"direction" Syntax and Note

Note:
Defines the reading order of the element. 
Specify the direction of the table column layout and the direction 
of the horizontal overflow.
This property does not affect the directional flow of alphanumeric characters.
Syntax:
    
element { direction: value }
elementID.style.direction = "value"
document.all.elementID.style.direction = "value" // IE only