Divstylemargin: 0auto cannot center the page because L-Blog does not add a DTD before HTML by default, so IE explained the document in HTML instead of XHTML and wrote a jsp page today.
123xxx
How can this problem be solved? The page cannot be displayed in the center, and other styles may be inexplicably displayed.
Later I found a solution to this problem:
It turns out that L-Blog does not add DTD before HTML by default, So IE will explain the document in HTML instead of XHTML.
The problem lies not in CSS but in the XHTML web page itself.
This code must be added to make the above settings effective:
The Code is as follows:
If you want more Strict XHTML 1.0 Strict or XHTML 1.1, please refer to the relevant documentation.
The above tests are based on Windows XP SP2 IE6 and FireFox 1.0 Final version.
We recommend that you do not delete this line if the css style is required on the page:
The Code is as follows: