기술과 산업/언어 및 프레임워크
[HTML] 화면 중앙 위치 시키기
B컷개발자
2015. 2. 4. 18:12
728x90
1.
#center { position:absolute; top:40%; left:40%; width:466px; height:400px; overflow:hidden; margin-top:-150px; margin-left:-100px;} <div id="center"> </div> |
2.
.container { width:auto; height:auto; text-align:center; vertical-align:middle; } .block { margin: 150px; } <div class="container"> <div class="block">
</div> </div> |
되긴하는데 찜찜하네...역시 자기가 잘 못하는 영역은 넘보는게 아닌듯.
728x90