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

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

"styleFloat" Example

   <source lang="html4strict">
   

<html> <body> <img id="myImg1"

    src="http://www.wbex.ru/style/logo.png" 
    border="0" 
    style="float:left">
    

Move the mouse pointer here

<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>


     </source>
   
  


"styleFloat" is applied to

   <source lang="html4strict">

+----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | |<applet> |

| |
| | |<button>
|

| | | | |<custom>

| | | <dir> |

| |
|

| |

| | |<embed> <fieldset> | | |<form> <hn> |

| |
|

| |<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> | | | <label> |

| |<legend>
  • | | |<listing> <marquee> | | |<menu> <object> | | |

      | | |

                                                           |
      |                |                                                     |
      |                |                          <select>                      |
      |                |                                                 |
      |                |                                              |
      |                |                                                    |
      |                |                         <textarea>                    |
      |                |                                                       |
      |                |
        | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>

        "styleFloat" Possible Values

        <source lang="html4strict"> Possible Values left, right, none.


        </source>



        "styleFloat" Syntax and Note

        <source lang="html4strict"> Note: JavaScript-only style property Syntax:

        elementID.style.styleFloat = "value" document.all.elementID.style.styleFloat = "value"


        </source>