어떠한 요소의 크기와 위치에 영향을 주는 영역으로, 대부분 가장 가까운 블록 레벨 조상의 콘텐츠 영역이 컨테이닝 블록이 된다. (예외도 있다)
width, height, padding, margin 값과 절대 위치(absolute, fixed 등)로 설정된 요소의 offset 값은 자신의 컨테이닝 블록으로부터 계산됨top, bottom, left, righthtml 으로 viewport 또는 페이지 영역(페이지로 나뉘는 매체일 경우)의 크기와 같음해당 요소의 position 속성값에 따라 어떤 요소를 컨테이닝 블록으로 삼을지 조건이 달라진다. 속성값 별로 컨테이닝 블록을 구성하는 요소를 알아보자.
inline-block, block, list-item 등)의 콘텐츠 영역 경계table, flex, grid, 또는 블록 컨테이너 자기 자신position 속성이 static 이 아닌 가장 가까운 조상의 내부 영역inline 일 때: 패딩을 포함한 콘텐츠 영역을 따라 위치가 지정됨inline 이 아닐 때: 패딩을 제외한 콘텐츠 영역 경계를 따라 위치가 지정됨transform, perspective, fillter 속성이 none이 아닌 것will-change 속성이 transform 이나 perspective 인 것will-change 속성이 filter 일 때도 적용contain 속성이 paint 인 것예제를 통해 position: absolute의 컨테이닝 블록이 transform 속성에 따라 달라지는 것을 살펴보자.
아래와 같이 HTML 문서가 작성되었을 때를 비교로 하면
<div class="relative-item">
이 요소는 position: relative입니다.
<div class="transform-item">
이 요소는 transform 속성을 껐다 켰다
<span class="absolute-item">이 요소는 position: absolute입니다</span>
</div>
</div>
먼저, transform 속성이 선언되지 않았을 경우,

.relative-item {
position: relative;
width: 400px;
height: 300px;
background-color: lightblue;
border: 2px solid black;
}
.transform-item {
width: 50%;
height: 140px;
margin-top: 100px;
margin-right: 100px;
color: #fff;
background-color: blue;
}
.absolute-item {
position: absolute;
top: 80px;
left: 80px;
width: 50%;
background-color: orange;
}
가장 상위의 relative-item에게는 position: relative를 선언하고, 가장 하위의 absolute-item에게는 position: absolute를 선언한다. 그러면, 위 그림과 같이 absolute-item은 relative-item을 기준으로 위치가 지정된 것을 볼 수 있다.
다음은 transform 속성이 선언된 경우,

.relative-item {
position: relative;
width: 400px;
height: 300px;
background-color: lightblue;
border: 2px solid black;
}
.transform-item {
width: 50%;
height: 140px;
margin-top: 100px;
margin-right: 100px;
color: #fff;
background-color: blue;
transform: translate(20px, 20px);
}
.absolute-item {
position: absolute;
top: 80px;
left: 80px;
width: 50%;
background-color: orange;
}
transform: translate(20px, 20px)을 선언하자, absolute-item가 가장 상위 요소인 relative-item에 선언했던 position: relative를 무시하고 transform-item을 기준으로 위치가 지정된 것을 볼 수 있다.
height 값에 영향을 받는 속성height, top, bottomheight 값을 이용하여 위 속성의 백분율을 계산함position이 relative 거나 static 이면 컨테이닝 블록의 height값이 명시되지 않았기 때문에 요소의 백분율은 0이 됨width 값에 영향을 받는 속성width, left, right, padding, marginwidth 값을 이용하여 위 속성의 백분율을 계산함