소스 가운데정렬 확인 부탁드려요!
본문
아래 코드 가운데정렬하려면 어떻게해야하나요?
도무지 안되네요...ㅠㅠ
#tnb {float:left;margin:10px 0px;font-family: "Malgun Gothic", serif;font-size:15px;}
#tnb h3 {position:absolute;font-size:0;line-height:0;overflow:hidden}
#tnb ul {zoom:1}
#tnb ul:after {display:block;visibility:hidden;clear:both;content:""}
#tnb li {float:left}
#tnb a {display:inline-block;padding:0 10px;height:28px;color:#333;letter-spacing:-0.1em;line-height:2.4em}
#tnb a:focus, #tnb a:hover {text-decoration:none}
답변 3
margin:0px auto를 하실때 이것에 대한 width값이 있어야 겠지요. ㅎ
<div style='margin:0px auto;width:970px;'>
</div>
이렇게 한다면 970 가로를 가운데 정렬하시오가 될테인데
그 안에 저걸 넣어보세요.
margin:0px auto;
가운데 정렬 입니다.
어디를 가운데정렬하시고싶으신거세요 ?
답변을 작성하시기 전에 로그인 해주세요.