CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise


CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

Floating Property in CSS




With CSS float, an element can be pushed to the left or right, allowing other elements to wrap around it. Mostly float is used with images, but it is also used when working with layouts. The values for the float property are leftright, and none. Left and right float elements in those directions, respectively. none (the default) ensures that the element will not float. However, elements cannot float up or down. It can only be moved horizontally. If we place several elements together, they will float next to each other.




Its syntax is:-

< style >


float: none| left| right| initial| inherit;


< /style >


Further Explanation:-


Value Description
none The element does not float.
left The element floats to the left of its container
right The element floats to the right of its container
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Advance

All Sections related to CSS