If you want to keep a DIV centered vertically and horizontally at the same time, you can use the following CSS code to achieve it: {width:612px; height:470px; margin-top:-235px; margin-left:-306px ; position:absolute; top:50%; left:50%;}
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