1. Technology



float Description:

The float property defines the side around which other elements will flow around the floated element. The floated element will remain on the float side, while other content flows around it.

float in CSS Versions:

float Syntax:

float: left | right | none | inherit

  • left
    Float the element to the left with content flowing to the right.
  • right
    Float the element to the right with content flowing to the left.
  • none
    Remove any float values, and have content flow as it normally would.
  • inherit
    The element should have the same float setting as the parent.

float Initial Value:


float Applies To:

All elements.

float Inheritance:

This property is not inherited.

float Browser Support:

float Examples:

float an image right

 <img src="image.gif" alt="image" style="float: right;" />
 The text in this paragraph will flow on the left side of the image.

float Special Notes:

  • A great way to create a pull-quote style is to float a div or paragraph of text within your document. Be sure to give it a width smaller than the rest of your text.

More float Information:

©2014 About.com. All rights reserved.