Css: relative position-

  • <!DOCTYPE html> 
    1. <html> 
    2.  
    3. <head> 
    4.  <meta name="viewport" content="width=device-width, initial-scale=1"> 
    5.  
    6.  <style> 
    7.   .rt_cls { 
    8.    position: relative; 
    9.    border: 1px solid; 
    10.    left: 20px; 
    11.   } 
    12.  </style> 
    13.  
    14. </head> 
    15.  
    16. <body> 
    17.  Normal text : 
    18.  <div class="rt_cls"> 
    19.   Relative class applied here. 
    20.  </div> 
    21. </body> 
    22.  
    23. </html>


    24. Used of:-

      Relative Position



      The element is positioned relative to its normal position, so "left:20px" adds 20 pixels to the element's LEFT position. 
    Css: relative position- Css: relative position- Reviewed by Network security on May 09, 2019 Rating: 5

    No comments:

    Useful Information

    Powered by Blogger.