Default absolute positioning relative to the document - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Relative Position

Description

Default absolute positioning relative to the document

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style type="text/css">
#wide {<!-- w w  w.j  a va2  s .  com-->
   width:2001px;
   height:2px;
}

#abs {
   position:absolute;
   top:129px;
   right:0px;
   width:100px;
   height:100px;
   background-color:Chartreuse;
}
</style> 
  <title>Lore</title> 
 </head> 
 <body> 
  <div id="wide">
    Lorem 
  </div> 
  <div id="abs">
    Lorem 
  </div>  
 </body>
</html>

Related Tutorials