CSS

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

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS float Property

CSS float Property

 

 

The float property is used to specify whether an element should float to the left, right, or not at all. It will not work on elements that are positioned absolutely.

 

Default Value:-

 

Its default value is none.

 

Syntax:-

 

Its syntax is:- float: none | left | right | initial | inherit;

 

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 Properties

All Sections related to CSS