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

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

"float" Example

   <source lang="html4strict">
   

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

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

Move the mouse pointer here

<button onclick="myImage.style.styleFloat="right"">Change float to right</button> </body> </html>


     </source>
   
  


"float" is applied to

   <source lang="html4strict">

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

| |
| | |<button>
|

| | | | |currentStyle <custom> | | |

defaults | | | <dir> |

| |
|

| |

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

| |
|

| |<iframe> <img> | | |<inputtype="button"> <input type="checkbox"> | | |<input type="file"> <input type="image"> | | |<input type="password"> <input type="radio"> | | |<input type="reset"> <inputtype="submit"> | | |<input type="text"> <isindex> | | | <label> |

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

      | | |

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

        "float" Syntax and Note

        <source lang="html4strict"> Note: Whether the text can flow to the left, or right of an element, or not at all. It is equivalent to the styleFloat JavaScript property.

        Syntax:

        element { float: value }


        </source>