Home >Web Front-end >HTML Tutorial >CSS controls the horizontal and vertical centering of divs on the page_html/css_WEB-ITnose

CSS controls the horizontal and vertical centering of divs on the page_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:28:291132browse

#silverlightControlHost {

height: 200px;

width: 300px;

left:50%;

top :50%;

margin-left:-150px;

margin-top:-100px;

position: absolute;

text-align: center;

}

Modify the value of

as needed

height: 200px;

width: 300px;

and

margin-left:-150px;

margin-top:-100px;

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