property-value
position/absolute — CSS reference
Removes the box from ordinary flow and positions it with respect to its absolute-position containing block. Insets and margins determine placement and can contribute to sizing; the nearest positioned ancestor is a common but not exclusive containing-block trigger.
Formal Syntax & Structure
css syntaxcss
position: absolute;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS positioning lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#p{width:240px;height:160px;background:#e6eef2} #a{width:60px;height:30px;background:#128579} #b{height:20px;background:#adcde8}#p{position:relative}#a{position:absolute;top:15px;left:25px}</style><body><div id="p"><div id="a">A</div><div id="b">B</div></div></body></html>