반응형
HTML
<div class="txt_btn" style="background-color: #ddd;">
<ul>
<li class="box">박스 1</li>
<li class="box">박스 2</li>
<li class="box">박스 3</li>
</ul>
</div>
CSS
.txt_btn {
text-align: center;
}
.txt_btn ul {
display: inline-block;
list-style: none;
}
.txt_btn ul li {
float: left;
margin-left: 3px;
border: 1px solid red;
}
.box {
background-color: pink;
width: 60px;
height: 50px;
line-height: 50px;
}
See the Pen float 가운데 정렬 예시 by Oyat (@oyat0824) on CodePen.
반응형