The float property css

The float property in CSS is used for positioning and layout on web pages.


  • none: the element does not float. This is the initial value.
  • left: floats the element to the left of its container.
  • right: floats the element to the right of its container.
  • inherit: the element inherits the float direction of its parent.

The image above shows the use of the float attribute

Demo float property