CSS Layout, Center Vertical and Horizontal small CSS Div square - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Absolute Position

Description

CSS Layout, Center Vertical and Horizontal small CSS Div square

Demo Code

ResultView the demo in separate window

<html>
 <head></head> 
 <body> 
  <div style="border:1px solid; width:200px; height:200px; position:absolute; left:50%; top:50%; margin-left:-100px; margin-top:-100px">
    test <!--from  ww w  . j a  v  a2  s  .com-->
  </div>  
 </body>
</html>

Related Tutorials