검색 :
RSS 구독 : 글 / 댓글 / 트랙백 / 글+트랙백

width, height를 안다는 가정 하에서

<script>
#div
{
   width:600px; // 작성자가 임의로 지정한 크기입니다.
   height:400px; // 작성자가 임의로 지정한 크기입니다.
   position:absolute;
   left:50%;
   top:50%;
   margin-left:-300px; // width * 1/2 * -1
   margin-top:-200px; // height * 1/2 * -1
}
</script>

Creative Commons License
2010/04/29 09:36 2010/04/29 09:36

맨 위로