Position your HTML element with CSS

CSS helps you to position your HTML element. You can put any HTML element at whatever location you like. You can specify whether you want the element positioned relative to its natural position in the page or absolute based on its parent element. 


Let us see an example of relative positioning −

       <div style = "position:relative;left:70px;top:1px;background-color:blue;color: white;">
          This div has relative positioning.