Center a Website using CSS

The following tutorial is simple and will show you how to center your website using CSS.

Center a Website using CSS
Photo by Pankaj Patel / Unsplash

The following tutorial is simple and will show you how to center your website using CSS.

Add the following HTML in between the <body></body> tags:

<div class="wrapper">

</div>

Now center the website using the following CSS:

.wrapper { 
    margin: 0 auto; 
}