최신글 중간 정렬 아무리해봐도 안되네요..
본문
<div align="center" class="pic_lt">
이렇게 해봐도 안되고,,
.pic_lt {text-align:center; width:960px; position:relative;margin-bottom:20px;background:#fff}
이렇게해도 안되고,,,,어떻게 해야할까요,,???
답변 1
예제를 안내드리도록 하겠습니다.
<style>
.centered { display: table; margin-left: auto; margin-right: auto; }
</style>
<div class="centered">
<div class="item">block item</div>
</div>
또다른 예제 입니다.
<style>
.centeringContainer { text-align: center; }
.centered { display: table; margin-left: auto; margin-right: auto; display: inline-block; }
</style>
<div class="centeringContainer">
<span class="centered">
<span class="item" style="display:block">block item</span>
</span>
확인해보시고 적용해보시고 잘되시는걸 활용해보시기 바랍니다.
!-->!-->
답변을 작성하시기 전에 로그인 해주세요.