Center an element with CSS

css

Center a simple block element in CSS is pretty easy.

a block element

.center-block { margin: 0 auto; }

an inline element

.center { text-align: center; }

Reference

No known

History Nov 22, 2017