Positioning DIVS - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Positioning DIVS

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--from   ww  w  . j a  v  a 2 s.c o m-->
 <body> 
  <div style="position:relative; border:2px solid #000;  width:300px; height:100px"></div> 
  <div style="position:relative; padding-top: 10px;"></div> 
  <div style="position:relative; border:2px solid #000; width:300px; height:300px;"></div> 
  <div style="position:relative; padding-top: 10px;"></div> 
  <div style="position:relative; border:2px solid #000; width:300px; height:100px"></div>  
 </body>
</html>

Related Tutorials