'float' Example : float « CSS Attributes and Javascript Style Properties « HTML CSS Reference






'float' Example

    
<html>
<body>
<img id="myImage" 
     src="http://www.java2s.com/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="myImage.style.styleFloat='right'">Change float to right</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'float' Syntax and Note
2.'float' is applied to