Home >Web Front-end >HTML Tutorial >Example of a solution for using margin:0 auto in HTML to prevent the entire page from being centered
Today I am writing a jsp page, and I have to adjust the
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
If you want a more strict XHTML 1.0 Strict or XHTML 1.1, please check Related documents.
The above tests are based on Windows XP SP2 version IE6 and FireFox 1.0 final version.
It is recommended that if you need to use css style in the page, do not delete this line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Update For example, when using margin:0 auto in multiple html, the entire page is not centered. For related articles, please pay attention to the PHP Chinese website!