CSS float property

Usage

Specifies how an element will be positioned within another element, and how text and other content will wrap around it. For example you could float an image to the left of the page, causing body text to wrap around the right hand side.

Values

  • left - the element will move to the left of the parent element
  • right - the element will move to the right of the parent element
  • none - the element will be positioned within the flow of the element content (default)

Example

Code:

img {
  float: right;
}