The concept of absolute positioning
1. Use an absolutely positioned box to offset its "most recent" "ancestor Element" of "already positioned" as the baseline. If there are no ancestor elements that have been positioned, then the browser's window can be used as a benchmark for positioning.
2. Decide the position of the box to detach from the standard flow.
<HTML> <Head> <Metahttp-equiv= "Content-type"content= "text/html;CharSet=utf-8″/> <title>Untitled Document</title> <styletype= "Text/css">Body{margin:15px;font-family:Arial;font-size:12px; }. Father{Background-color:#ffff99;Border:1px solid #000000;padding:20px; }. Father Div{Background-color:#00ff00;padding:10px;Border:1px dashed #000000; }#block2{position:Absolute; Left: -;Top: -; } </style> </Head> <Body> <Divclass= "Father"> <Div>Box-1</Div> <DivID= "Block2″>Box-2</Div> <Div>Box-3</Div> </Div> </Body> </HTML>
CSS positioning: Absolute positioning (absolute)