Solution to using margin:0 auto in html and the entire page is not centered_HTML/Xhtml_Webpage Production

WBOY
Release: 2016-05-16 16:38:11
Original
2113 people have browsed it

Today I am writing a jsp page, and I have been adjusting it repeatedly:

123xxx
No matter how I adjust this property, I can't get the page to be displayed in the center, and other styles also have inexplicable problems

Later I found a solution to this problem:

It turns out that L-Blog does not add DTD before HTML by default, so IE interprets the document as HTML instead of XHTML.
Problem It is not in the CSS but in the XHTML web page itself.
You need to add this code to make the above settings effective:

Copy code
The code is as follows:



If you want more strict XHTML 1.0 Strict or XHTML 1.1, please consult the relevant documentation.
The above tests are based on Windows XP SP2 version IE6 and FireFox 1.0 final version.

It is recommended not to delete this line if you need to use css styles in the page:

Copy code
The code is as follows:


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template