> For the complete documentation index, see [llms.txt](https://yamoo9.gitbook.io/css-grid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yamoo9.gitbook.io/css-grid/css-grid-guide/grid-align/align-content.md).

# align-content

## 사용법 <a href="#usage" id="usage"></a>

그리드 컨테이너의 크기보다 작은 그리드 아이템 트랙(`px`와 같은 고정 단위로 설정된 경우)의 크기라면, 아이템 트랙을 정렬할 수 있습니다. 이 속성은 열(column) 축을 따라 그리드 아이템 트랙을 정렬합니다. ([`justify-content`](/css-grid/css-grid-guide/grid-align/justify-content.md) 속성의 반대)

| **속성**          | **값**           |
| --------------- | --------------- |
| `align-content` | `start`         |
|                 | `center`        |
|                 | `end`           |
|                 | `stretch`       |
|                 | `space-around`  |
|                 | `space-between` |
|                 | `space-evenly`  |

**값**

* **start**: \
  그리드 컨테이너 영역의 시작점에 아이템 트랙을 정렬
* **center**: \
  그리드 컨테이너 영역의 중앙에 아이템 트랙을 정렬
* **end**: \
  그리드 컨테이너 영역의 끝점에 아이템 트랙을 정렬
* **stretch**: \
  그리드 컨테이너 영역을 아이템 트랙 크기를 조정하여 채움
* **space-around**: \
  그리드 컨테이너의 남은 영역을 아이템 트랙(열)이 좌/우 공간으로 나눔\
  (양 가장자리 공간은 아이템 그룹 사이 간격의 1/2)
* **space-between**: \
  그리드 컨테이너 영역의 양 가장자리 공백 없이, 아이템 트랙(열) 사이 공간을 나눔
* **space-evenly**: \
  `space-around`와 비슷해보이지만, 공간을 모두 동일하게 나누는 점이 다름 \
  (아래 예시 그림 참조)

**예시**

```css
.grid-container {
  align-content: start;
}
```

<div align="left"><img src="https://3440753900-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH1dN99ZXtZTFG_0JKV%2F-LH7suY9G-ildZlysU1p%2F-LH7yQ6RowV3R_l6mwoF%2Fimage.png?alt=media&amp;token=ffd71737-25e4-4f15-a534-bf9b8cac487a" alt=""></div>

```css
.grid-container {
  align-content: center;
}
```

<div align="left"><img src="https://3440753900-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH1dN99ZXtZTFG_0JKV%2F-LH7suY9G-ildZlysU1p%2F-LH7yX3uu9dCNEyoDtaK%2Fimage.png?alt=media&amp;token=7f762583-dbd1-435b-8a0b-4e26c5369e05" alt=""></div>

```css
.grid-container {
  align-content: end;
}
```

<div align="left"><img src="https://3440753900-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH1dN99ZXtZTFG_0JKV%2F-LH7suY9G-ildZlysU1p%2F-LH7y_YXWTrCYrnkok0M%2Fimage.png?alt=media&amp;token=688f4092-635c-4a84-8c99-e93eec7efec8" alt=""></div>

```css
.grid-container {
  align-content: stretch;
}
```

<div align="left"><img src="https://3440753900-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH1dN99ZXtZTFG_0JKV%2F-LH7suY9G-ildZlysU1p%2F-LH7ycKT7RjParjR36qQ%2Fimage.png?alt=media&amp;token=24ffa700-6451-4d7b-81ee-9ac984f027d8" alt=""></div>

```css
.grid-container {
  align-content: space-around;
}
```

<div align="left"><img src="https://3440753900-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH1dN99ZXtZTFG_0JKV%2F-LH7suY9G-ildZlysU1p%2F-LH7yeg49GTvY3Wcby2Q%2Fimage.png?alt=media&amp;token=a06ace34-decd-414a-942c-b9c7b28102fa" alt=""></div>

```css
.grid-container {
  align-content: space-between;
}
```

<div align="left"><img src="https://3440753900-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH1dN99ZXtZTFG_0JKV%2F-LH7suY9G-ildZlysU1p%2F-LH7yiASx1BzMHkWAmay%2Fimage.png?alt=media&amp;token=02d82c89-c5bb-47c6-a78e-414defbfe098" alt=""></div>

```css
.grid-container {
  align-content: space-evenly;
}
```

<div align="left"><img src="https://3440753900-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH1dN99ZXtZTFG_0JKV%2F-LH7suY9G-ildZlysU1p%2F-LH7yl-D68YV9NruFRQ6%2Fimage.png?alt=media&amp;token=65a95101-7903-4a74-81d9-8603204e42e3" alt=""></div>

## 레퍼런스 <a href="#reference" id="reference"></a>

![](https://3440753900-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH1dN99ZXtZTFG_0JKV%2F-LH7suY9G-ildZlysU1p%2F-LH7xl6LkBsn4ErLt6Za%2Fimage.png?alt=media\&token=04d67cc9-5f27-40be-a217-77b393faeaf5)

{% embed url="<https://www.w3.org/TR/css-grid-1/#grid-align>" %}
w3.org/TR/css-grid-1/#grid-align
{% endembed %}
