Float

Description:

This property specifies whether or not a box should float and, if so, if it should float to the left or to the right. A floating box is shifted to the left or to the right as far as it can go, and non-floating content in the normal flow will flow around it on the opposite side. The float property is ignored for elements that are absolutely positioned. User agents are also allowed to ignore it when it’s applied to the root element.

Example:

This style rule makes the box generated by the element with ID "nav" float to the left:
#nav {
  float: left;
}

Value:

left
makes the element generate a block box that is floated to the left

right
makes the element generate a block box that is floated to the right

none
makes the element generate a box that is not floated

No comments:

Post a Comment