How to make div Center

How to make div Center:
No need to use align= center because align is not supported by div
Just take a dive and make its width 90% or as you want then use

margin-left:auto;
margin-right:auto;

Consider we have following home.css file contains

body
{
    background-color:Gray;
}
#header
{
    border-radius: 5px;
    margin-left:auto;
    margin-right:auto;
    background-color:Silver;
    width:80%;
    height:250px;
}
#Div1
{
    margin-left:auto;
    margin-right:auto;
   background-color:Black;
   width:60%;
   height:250px;
}

and Html file contains


    I am test page

Then it shows following output.