Css:- absolute position

<!DOCTYPE html> 

<html> 

 

<head> 

 <meta name="viewport" content="width=device-width, initial-scale=1"> 

 

 <style> 

  .abs_cls { 

   position: absolute; 

   border: 1px solid; 

   left: 20px; 

  } 

 </style> 

 

</head> 

 

<body> 

 Normal text : 

 <div class="abs_cls"> 

  Absolute class applied here. 

 </div> 

</body> 

 

</html>
 output:- 
   

Absolute Position



    Absolute means the element is positioned relative to it's first positioned (not static) ancestor element.
    Also define the border and adds 20 pixels to the element's LEFT position.



Css:- absolute position Css:- absolute position Reviewed by Network security on May 12, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.