How to position an element to its non-static parent?

An absolute position element is positioned relative to the first parent non-static element. If there is no such element, it uses .

h1{

   position:absolute; 

   left:100px; 

   top:150px;

}

Absolutely positioned elements are removed from the normal flow. The other elements act like there is no absolute-positioned element.

 

Absolutely positioned elements can overlap other elements.

 









h2{

    position:absolute;

    left:100px;

    top:150px;

}







   This is a heading with an absolute position