<style type="text/css">
<!--
body {
background-image: url(imgs/back_pattern.jpg);
height: 100%;
}
#center {
position: absolute;
top: 50%;
left: 50%;
width: 100px;
height: 100px;
overflow: hidden;
background: gray;
margin-top: -50px;
margin-left: -50px;
}
-->
</style>
</head>
<body>
<div id="center">정중앙으로 정렬하기</div>
</body>
<!--
body {
background-image: url(imgs/back_pattern.jpg);
height: 100%;
}
#center {
position: absolute;
top: 50%;
left: 50%;
width: 100px;
height: 100px;
overflow: hidden;
background: gray;
margin-top: -50px;
margin-left: -50px;
}
-->
</style>
</head>
<body>
<div id="center">정중앙으로 정렬하기</div>
</body>
'자료실' 카테고리의 다른 글
끝도 없이 열리는 인터넷 창 한번에 닫기 (0) | 2010.04.25 |
---|---|
[텍스트] 마퀴효과 (0) | 2010.04.25 |
[flash] 로컬에서 플래시가 제대로 실행이 안될때 설정하는 방법 (0) | 2010.04.20 |
[jsp, asp] include 문 참조 (0) | 2010.04.20 |
이미지 해상도 상관없이 정중앙에 위치시키고 싶을때... (0) | 2010.04.20 |