Css:- float and clear


<!DOCTYPE html> 
<html> 
 
<head> 
 <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
 <style> 
  .fleft { 
   float: left; 
  } 
   
  .clear_cls { 
   clear: both; 
  } 
 </style> 
 
</head> 
 
<body> 
 
 <div class="fleft"> 
  Float Left 
 </div> 
 <div class="clear_cls"> 
  After Clear 
 </div </body> 
 
</html>


Used of:-


Float and clear



    The float property can be used to wrap text around images.
    The clear property is used to control the behavior of floating elements.
    Elements after a floating will flow around it. To avoid this, use the clear property.
    The clear property specifies on which sides of an element floating elements are not allowed to float.
Css:- float and clear Css:- float and clear Reviewed by Network security on May 12, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.