<article>
  <div>Bloc centré ?</div>
  <div style="width: 80px;">Bloc centré</div>
</article>
article {
  border: 1px solid red;
}

div {
  margin: 10px auto;
  border: 1px solid blue;
}
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.