float 요소 중앙 정렬

devforest443·2022년 7월 27일
0

log 2015. 5. 6. 12:50

html

<ul class="test">    
  <li>하하</li>    
  <li>하하</li>    
  <li>하하</li>    
  <li>하하</li>    
  <li>하하</li>
</ul>
.test {float: right; position: relative; left: -50%;}
.test li {float: left; position: relative; left: 50%; border: 1px solid red;}
profile
devforest443

0개의 댓글