HTML CSS Reference/CSS Attributes and Javascript Style Properties/right

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

"right" Example

    
<html>
<body>
<p>
<img id="myImg" 
     src="http://www.wbex.ru/style/logo.png" 
     width=74 
     height=100" 
     style="position:relative">
</p>
<input type="button" 
       value="Set right property to 100" 
       onclick="myImg.style.right=100">
       
<input type="button" 
       value="Restore image position" 
       onclick="myImg.style.right=0">
</body>
</html>



"right" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <address>                     |
|                |<applet>                        <b>                           |
|                |<big>                           <blockquote>                  |
|                |<button>                        <center>                      |
|                |<cite>                          <code>                        |
|                |currentStyle                    <dd>                          |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |<fieldset>                      <font>                        |
|                |<form>                          <hn>                          |
|                |<hr>                            <i>                           |
|                |<iframe>                        <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">             <isindex>                     |
|                |<kbd>                           <label>                       |
|                |<legend>                        <li>                          |
|                |<listing>                       <marquee>                     |
|                |<menu>                          <object>                      |
|                |<ol>                            <p>                           |
|                |<pre>                           runtimeStyle                  |
|                |<s>                             <samp>                        |
|                |<select>                        <small>                       |
|                |<span>                          <strike>                      |
|                |<strong>                        style                         |
|                |<sub>                           <sup>                         |
|                |<table>                         <textarea>                    |
|                |<tt>                            <u>                           |
|                |<ul>                            <var>                         |
|                |<xmp>                                                         |
+----------------+--------------------------------------------------------------+



"right" Possible Values

Possible Values
auto          The default; regular HTML position
length        A floating-point number followed by a unit designator
percentage    Percentage of the parent element width



"right" Syntax and Note

Note:
Set the right edge position, including 
any padding, border, margin, and is relative to adjacent elements. 
Syntax:
    
element { right: value }
elementID.style.right = "value"
document.all.elementID.style.right = "value" // IE only