Translate

ads

27 Jun 2019

CSS Float


CSS Float



Float could be a CSS property written in CSS file or directly within the sort of an element. The float property defines the flow of content. Below ar the categories of floating properties


FLOAT TYPE
USAGE
float: left
Element foats on left side of the container
float: right
Element floats on right side of container
float: inherit
Element inherits floating property of it’s parent (div, table etc…)
float: none
Element is displayed as it is (Default).


 
<!DOCTYPE html> 
<html> 
<head> 
            <title>Float</title> 
</head> 
<body> 
<div class = "SIS" style = "font-size:40px; 
color:#006400; float:left;"> 
            Sayed 360 
</div> 
</body> 
</html>  
         
float:right


<!DOCTYPE html> 
<html> 
<head> 
            <title>Float</title> 
</head> 
<body> 
<div class = "SIS" style = "font-size:40px; 
color:#006400; float:right;"> 
            Sayed 360 
</div> 
</body> 
</html> 

folat:none

<!DOCTYPE html> 
<html> 
<head> 
<title>Float</title> 
</head> 
<body> 
<div class = "SIS" style = "font-size:40px; 
color:#006400; float:none;"> 
Sayed 360  
</div> 
</body> 
</html>
 
float:inherit

<!DOCTYPE html>
<html>
<head>
            <title>Float</title>
</head>
<body>
<div style="float:right">
            <div class = "SIS" style = "font-size:40px;
            color:#006400; float:inherit;">
                        Sayed 360
            </div>
</div>
</body>
</html>



No comments:

Post a Comment