Copyright © tutorialspoint.com

CSS - float

previous next


Description:

The float property causes an element to be moved to one side of the parent element.s content area, which allows other content to flow around it.

Possible Values:

Applies to:

All the elements but positioned elements and generated content.

DOM Syntax:

object.style.float="left";

Example:

Here is the example showing usage of this property:

<h1 style="float: left;">CSS float Example</h1>
<p>If your browser supports the CSS float Property, this
text will be flowing around the heading.</p>

This will produce following result:

CSS float Example

If your browser supports the CSS float Property, this text will be flowing around the heading.

To Become more comfortable - Do Online Practice


previous next

Copyright © tutorialspoint.com