<body> position: relative, inline - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Relative Position

Description

<body> position: relative, inline

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
html {<!--  w ww . ja va2 s. c o  m-->
   background-color:Chartreuse;
}

div.menu {
   border:2px solid yellow;
   background-color:blue;
   position:absolute;
   right:11px;
   top:11px;
}

body {
   background-color:pink;
   width:91%;
   position:relative;
   left:11px;
   top:11px;
}
</style> 
 </head> 
 <body> 
  <div class="menu">
    Lorem ipsum dolor sit ame 
  </div> 
  <p>Lorem ip</p> 
  <p>Lorem ip</p> 
  <p>Lorem ip</p> 
  <p>Lorem ip</p>  
 </body>
</html>

Related Tutorials