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

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

"styleFloat" Example

    
<html>
<body>
<img id="myImg1" 
     src="http://www.wbex.ru/style/logo.png" 
     border="0" 
     style="float:left">
     
<p style="font-family:verdana; 
          width=200; 
          cursor:hand">
     Move the mouse pointer here
</p>
<button onclick="myImg1.style.styleFloat="right"">Change float to right</button>
<button onclick="myImg1.style.styleFloat="left"">Change float to left</button>
<button onclick="myImg1.style.styleFloat="none"">Change float to none</button>
</body>
</html>



"styleFloat" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <address>                     |
|                |<applet>                        <b>                           |
|                |<big>                           <blockquote>                  |
|                |<button>                        <center>                      |
|                |<cite>                          <code>                        |
|                |<custom>                        <dd>                          |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |<dt>                            <em>                          |
|                |<embed>                         <fieldset>                    |
|                |<form>                          <hn>                          |
|                |<hr>                            <i>                           |
|                |<iframe>                        <img>                         |
|                |<input type="button">           <inputtype="checkbox">        |
|                |<input type="file">             <input type="image">          |
|                |<inputtype="password">          <input type="radio">          |
|                |<input type="reset">            <inputtype="submit">          |
|                |<input type="text">             <isindex>                     |
|                |<kbd>                           <label>                       |
|                |<legend>                        <li>                          |
|                |<listing>                       <marquee>                     |
|                |<menu>                          <object>                      |
|                |<ol>                            <p>                           |
|                |<pre>                           <rt>                          |
|                |<ruby>                          <s>                           |
|                |<samp>                          <select>                      |
|                |<small>                         <span>                        |
|                |<strike>                        <strong>                      |
|                |<sub>                           <sup>                         |
|                |<table>                         <textarea>                    |
|                |<tt>                            <u>                           |
|                |<ul>                            <var>                         |
|                |<xmp>                                                         |
+----------------+--------------------------------------------------------------+



"styleFloat" Possible Values

Possible Values
left,
right,
none.



"styleFloat" Syntax and Note

Note:
JavaScript-only style property
Syntax:
    
elementID.style.styleFloat = "value"
document.all.elementID.style.styleFloat = "value"