2007. 2. 15. 15:36
Programing/HTML/JavaScript/CSS
<STYLE type=text/css>
#mydiv {
position:absolute;
top: 50%;
left: 50%;
width: 200px;
height: 100px;
margin-top: -50px; /*set to a negative number 1/2 of your height*/
margin-left: -100px; /*set to a negative number 1/2 of your width*/
border: 1px solid #ccc;
background-color: #f3f3f3;
}
</STYLE>
<DIV id=mydiv>
**************
</DIV>
#mydiv {
position:absolute;
top: 50%;
left: 50%;
width: 200px;
height: 100px;
margin-top: -50px; /*set to a negative number 1/2 of your height*/
margin-left: -100px; /*set to a negative number 1/2 of your width*/
border: 1px solid #ccc;
background-color: #f3f3f3;
}
</STYLE>
<DIV id=mydiv>
**************
</DIV>
'Programing > HTML/JavaScript/CSS' 카테고리의 다른 글
Array.remove() (3) | 2007.03.28 |
---|---|
AJAX 실전 #1 - XMLHttpRequest (0) | 2007.03.14 |
[HTML] LABEL과 사용자 중심의 프로그래밍-UI (3) | 2007.01.05 |
[HTML] FIELDSET과 LEGEND (0) | 2007.01.05 |
[CSS] onMouseOver,onMouseOut은 그만!! (17) | 2007.01.03 |