How to horizontally Centre a DIV Using CSS


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Horizontally Centre</title>
<style type="text/css">
    .main {  width : 100% ;   height :  700px ;    background  :  #FFF; }
    .inner { width : 700px ;   height :  700px ;    background  :  #CCC ;  margin : 0 auto; }
</style>
</head>
<body>
<div class="main">
<div class="inner"> &nbsp; </div>
</div>
</body>
</html>

Share on Google Plus

About alpanadesign

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments: