floatfloat*
*Contents  *Index  *Topic Contents
*Previous Topic: filter
*Next Topic: font

float

Description

Specifies whether the object floats, causing text to flow around it.

Syntax

{ float: left | right | none}

Remarks

With the value none, the element will be displayed where it appears in the text. With a value of left (right), the margin properties will decide the horizontal positioning of the image and the text will flow on the right (left) side of the image. With a value of left or right, the element is treated as block-level (that is, the display property is ignored).

This attribute is not inherited.

Example

The following example demonstrates the float attribute.

<html>
<head>
<title>case for float</title>
</head>
<body>
<p>This is an example of float. "image1" should float to the left and "image2" should float to the right.
<img src=" http://www.microsoft.com/image1.gif" style="float:left">
<img src="http://www.microsoft.com/image2.gif" style="float:right">
<p>
</body>
</html>

Applies To

TABLE, INPUT, TEXTAREA, INPUT type=button, DIV, SPAN, OBJECT, APPLET, EMBED, IFRAMES, MARQUEE, SELECT

Scripting Property

styleFloat


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.