Loading Please Wait...

Logo Lynxsia IT Solutions

CSS Float And Clear

CSS Float And Clear

The CSS float property specifies how an element should float.

The CSS clear property specifies what elements can float beside the cleared element and on which side.

CSS Float

The CSS float property is used for positioning and formatting content e.g. let an image float left to the text in a container.

left: The element floats to the left of its container

right: The element floats to the right of its container

none: The element does not float (will be displayed just where it occurs in the text)

Global values: inherit, initial, revert, revert-layer, unset.

					 
        
          /* Keyword values */
          float: left;
          float: right;
          float: none;

          /* Global values */
          float: inherit;
          float: initial;
          float: revert;
          float: revert-layer;
          float: unset;
        
      
CSS Clear

When we use the float property, and we want the next element below (not on right or left), we will have to use the clear property.

left: The element is pushed below left floated elements

right: The element is pushed below right floated elements

none: The element is not pushed below left or right floated elements

both: The element is pushed below both left and right floated elements

Global values: inherit, initial, revert, revert-layer, unset.

					 
        
          /* Keyword values */
          clear: none;
          clear: left;
          clear: right;
          clear: both;

          /* Global values */
          clear: inherit;
          clear: initial;
          clear: revert;
          clear: revert-layer;
          clear: unset;
        
      

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved