What are the considerations for using element centering in HTML
This article will explain in detail what you need to pay attention to when using elements in HTML. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Do not use positioning
Horizontal center: text-align = center; (inheritable)
Center vertically: margin:0 auto; (block-level elements)
Others in the middle: 1. Text center: parent element sets high child element sets high line-height=height (parent element)
two。 Picture center: vertical-aign:middle