Home  >  Article  >  Web Front-end  >  Center the table in the div_html/css_WEB-ITnose

Center the table in the div_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:51:181063browse

  1. Write style="text-align:center" on the div tag
  2. Write style="margin:auto;" in the table in the div

    margin represents the number of outer margins in the clockwise direction, top, right, bottom, left. You can write four in total.

    http://www.w3school.com.cn/cssref/pr_margin.asp

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn