Home >Web Front-end >CSS Tutorial >How to write centered css in IE and FF_Experience exchange

How to write centered css in IE and FF_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:06:001134browse

IE method:


The content within the tag is centered.
Non-IE method:

The left and right margins of the tag automatically adapt to achieve a centered effect.
The standard recommended CSS usage method is the latter, and the one used by IE is non-standard.
However, if you use the standard DTD declaration (xhtml version) in IE6, you can also use the margin:0 auto; method to achieve the centering effect.

[Ctrl A Select all Note:If you need to introduce external Js, you need to refresh to execute]

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