SyntaxStudy
Sign Up

float

property

Specifies that an element should be placed along the left or right side of its container.

Syntax

float: left | right | none;

Example

css
.image-left {
    float: left;
    margin: 0 20px 10px 0;
    width: 300px;
}

/* Clearfix hack */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}