--- id: css-grid-items title: "CSS Grid Items" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["grid-column", "grid-row", "grid-column-start", "grid-column-end", "grid item span", "CSS grid lines", "grid-area"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.9 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "grid", "layout"] raw_sources: ["https://www.w3schools.com/css/css_grid_item.asp"] applied_in: [] github_commit: "" --- # [[CSS Grid Items]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) All direct children of a grid container automatically become grid items, and each item can span multiple columns or rows by referencing column-lines and row-lines through `grid-column-start/end` and `grid-row-start/end` (or their shorthands). [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Grid items** β€” a grid container contains one or more grid items; all direct child elements of a grid container automatically become grid items. [S1] - **Spanning** β€” a grid item can span over multiple columns or rows by specifying where it starts and ends. [S1] - **Grid lines** β€” the lines between the columns are called column-lines, and the lines between the rows are called row-lines; line numbers are used to place a grid item in the container. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Line-number placement** β€” set `grid-column-start`/`grid-column-end` (and the row equivalents) to numeric line indices to place and size an item. [S1] - **`/ span N` shorthand** β€” `grid-column: 1 / span 2;` starts at a line and spans a number of tracks instead of naming the end line. [S1] - **Combined placement** β€” apply both `grid-column` and `grid-row` to a single item to span across both axes simultaneously. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) **Grid items** A grid container contains one or more grid items. All direct child elements of a grid container automatically become grid items. A grid item can span over multiple columns or rows; we specify where to start and end a grid item by using placement properties. The lines between the columns in a grid are called column-lines, and the lines between the rows in a grid are called row-lines. We can refer to line numbers when placing a grid item in a grid container. [S1] **Properties for placing grid items** [S1] | Property | Purpose | |----------|---------| | `grid-column-start` | Specifies on which column-line the grid item will start | | `grid-column-end` | Specifies on which column-line the grid item will end | | `grid-column` | Shorthand property for `grid-column-start` and `grid-column-end` | | `grid-row-start` | Specifies on which row-line the grid item will start | | `grid-row-end` | Specifies on which row-line the grid item will end | | `grid-row` | Shorthand property for `grid-row-start` and `grid-row-end` | Using `grid-column-start` and `grid-column-end` to make an item start at column-line 1 and end at column-line 3: [S1] ```css .item1 { grid-column-start: 1; grid-column-end: 3; } ``` The same result with the `grid-column` shorthand using `/ span`: [S1] ```css .item1 { grid-column: 1 / span 2; } ``` Using `grid-row-start` and `grid-row-end` to make an item start at row-line 1 and end at row-line 3: [S1] ```css .item1 { grid-row-start: 1; grid-row-end: 3; } ``` The same result with the `grid-row` shorthand using `/ span`: [S1] ```css .item1 { grid-row: 1 / span 2; } ``` Combining `grid-column` and `grid-row` so the item spans two columns and two rows: [S1] ```css .item1 { grid-column: 1 / span 2; grid-row: 1 / span 2; } ``` **Complete CSS Grid Item properties reference** [S1] | Property | Description | |----------|-------------| | `align-self` | Aligns the content for a specific grid item along the column axis | | `grid-area` | Shorthand property for `grid-row-start`, `grid-column-start`, `grid-row-end` and `grid-column-end` | | `grid-column` | Shorthand property for `grid-column-start` and `grid-column-end` | | `grid-column-end` | Specifies where to end the grid item | | `grid-column-start` | Specifies where to start the grid item | | `grid-row` | Shorthand property for `grid-row-start` and `grid-row-end` | | `grid-row-end` | Specifies where to end the grid item | | `grid-row-start` | Specifies where to start the grid item | | `justify-self` | Aligns the content for a specific grid item along the row axis | | `place-self` | Shorthand property for `align-self` and `justify-self` | ## πŸ› οΈ 적용 사둀 (Applied in summary) The page's own examples are the applied cases: placing `.item1` by explicit start/end lines, by `/ span` shorthand, and spanning both columns and rows at once. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Explicit line placement (language: CSS): ```css .item1 { grid-column-start: 1; grid-column-end: 3; } ``` Span shorthand: ```css .item1 { grid-column: 1 / span 2; } ``` Span across both axes: ```css .item1 { grid-column: 1 / span 2; grid-row: 1 / span 2; } ``` ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) No contradictions found in the source. ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual (μ‹€μ œ 적용 사둀 발견 μ‹œ applied/validated둜 승격 κ°€λŠ₯) - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.9 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[CSS Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSS Grid Align]], [[CSS Grid Item Named]], [[CSS Grid Item Align]], [[CSS Grid Item Order]] - **μ°Έμ‘° λ§₯락:** How individual children are positioned and sized within a grid layout. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Grid Items β€” https://www.w3schools.com/css/css_grid_item.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Grid Items" page (Astra wiki-curation, P-Reinforce v3.1 format).