One of the most common tasks while designing web pages is centering elements both vertically and horizontally.
To center a block (div, p, h1, and so on) horizontally, the only thing you have to do is to apply a margin
auto to it. For example,
.horizontal-align {
margin:0 auto;
width:200px;
}