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

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

"margin-right" Example

    
<html>
<head>
</head>
<body>
<p>The following image has a right margin of 3mm.</p>
<img src="http://www.wbex.ru/style/logo.png" 
     height="50" 
     width="50" 
     style="margin-right="3mm"">
</body>
</html>



"margin-right" is applied to

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



"margin-right" Possible Values

Possible Values
auto           The default; bottom and top margins are equal.
integer        A floating-point number followed by a unit designator.
percentage     Percentage of the parent element"s height.



"margin-right" Syntax and Note

Note:
Define the element right margin.
Syntax:
    
element { margin-right: value }
elementID.style.marginRight = "value"
document.all.elementID.style.marginRight = "value" // IE only