HTML&CSS/CSS
width와 height
yunajoe
2022. 12. 20. 19:28
- CSS에서 height와 width 속성을 설정할 때 그 크기가 가르키는 부분은 내용(content) 부분만을 대상으로 한다
- HTML 요소의 전체 너비(width)를 계산하는 공식
width + left padding + right padding + left border + right border + left margin + right margin
- HTML 요소의 전체 높이(height)를 계산하는 공식
height + top padding + bottom padding + top border + bottom border + top margin + bottom margin