float를 해제하는 방법
1. 부모에 BFC 속성 선언
2. 형제요소에 clear 속성선언
(Block Formatting Context)
float (속성값 none 제외)
position: absolut/ fixed
display: inline-block
display: table-cell
overflow (속성값 visible 제외)
.
1) 부모에 float 선언
2) 부모에 overflow 선언
3) 부모에 inline-block 선언
2. clear 사용
both
left
right
- clear를 사용해야 할 위치는 어디일까?
float: right
float: left
1
2
3
4
1) 빈태그
2) 가상요소
By Min Young Lee