--- id: css-flex-items title: "CSS Flex Items" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["flex items", "flex-grow", "flex-shrink", "flex-basis", "order", "align-self", "flex shorthand"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.89 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "flexbox", "flex-items"] raw_sources: ["https://www.w3schools.com/css/css3_flexbox_items.asp"] applied_in: [] github_commit: "" --- # [[CSS Flex Items]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The direct child elements of a flex container automatically become flex items, controllable through six properties: `order`, `flex-grow`, `flex-shrink`, `flex-basis`, `flex`, and `align-self`. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Automatic flex items** β€” the direct child elements of a flex container automatically become flex items. [S1] - **Six item-level properties** β€” `order`, `flex-grow`, `flex-shrink`, `flex-basis`, `flex` (shorthand), and `align-self`. [S1] - **`align-self` overrides the container** β€” it overrides the default alignment set by the container's `align-items` property. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Item properties go on the child, not the container** β€” these properties are set on individual flex items (often inline in the examples). [S1] - **`flex` as a shorthand** β€” combine `flex-grow`, `flex-shrink`, and `flex-basis` into a single `flex` declaration. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) The direct child elements of a flex container automatically becomes flex items. Flex items can be controlled through six key properties. [S1] **1. The `order` Property** The `order` property specifies the display order of the flex items inside the flex container. The default value is 0, and the value must be a number. [S1] ```html
1
2
3
4
``` **2. The `flex-grow` Property** The `flex-grow` property specifies how much a flex item will grow relative to the rest of the flex items. The default value is 0. [S1] ```html
1
2
3
``` **3. The `flex-shrink` Property** The `flex-shrink` property specifies how much a flex item will shrink relative to the rest of the flex items. The default value is 1. [S1] ```html
1
2
3
4
5
6
``` **4. The `flex-basis` Property** The `flex-basis` property specifies the initial length of a flex item. [S1] ```html
1
2
3
4
``` **5. The `flex` Property** The `flex` property is a shorthand property for the `flex-grow`, `flex-shrink`, and `flex-basis` properties. [S1] ```html
1
2
3
4
``` **6. The `align-self` Property** The `align-self` property specifies the alignment for the selected item inside the flexible container. This property overrides the default alignment set by the container's `align-items` property. [S1] ```html
1
2
3
4
``` ```html
1
2
3
4
``` **Flex Item Properties Table** [S1] | Property | Description | |----------|-------------| | `align-self` | Overrides container's `align-items` for individual items | | `flex` | Shorthand for `flex-grow`, `flex-shrink`, `flex-basis` | | `flex-basis` | Sets initial length | | `flex-grow` | Controls growth rate relative to siblings | | `flex-shrink` | Controls shrinkage rate relative to siblings | | `order` | Specifies display sequence | ## πŸ› οΈ 적용 사둀 (Applied in summary) The page's own examples apply each property inline on `
` flex items inside a `.flex-container`. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Control individual flex items (language: HTML/CSS): ```html
A
B
C
D
``` ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) No contradictions found in the source. ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual (μ‹€μ œ 적용 사둀 발견 μ‹œ applied/validated둜 승격 κ°€λŠ₯) - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.89 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[CSS Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSS Flexbox Justify Content]], [[CSS Flexbox Align Items]], [[CSS Flexbox Responsive]] - **μ°Έμ‘° λ§₯락:** Referenced whenever controlling the order, growth, shrinkage, basis, or self-alignment of individual flex children. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Flex Items β€” https://www.w3schools.com/css/css3_flexbox_items.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Flex Items" page (Astra wiki-curation, P-Reinforce v3.1 format).