Home  >  Article  >  Web Front-end  >  Page text centering problem_html/css_WEB-ITnose

Page text centering problem_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:43:241051browse

Everyone will encounter the problem of centering the text of the entire page during website construction. Some people will say that just use margin:0 auto; ! But this can only set the center of one element. If you want the entire page to be centered, you must set all elements to be centered, which will be very troublesome!

Here is a method for you:

This method can be compatible with IE, Firefox and other browsers. If you only set the body without setting the center , there will be IE incompatibility, you can try it! !

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