--- id: css-flexbox-justify-content title: "CSS Flexbox Justify Content" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["justify-content", "flexbox main-axis alignment", "flex justify", "horizontal flex alignment", "space-between flexbox"] 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", "justify-content"] raw_sources: ["https://www.w3schools.com/css/css3_flexbox_container_justify.asp"] applied_in: [] github_commit: "" --- # [[CSS Flexbox Justify Content]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The `justify-content` property aligns flex items along the main-axis (horizontally) within a flex container, offering values from simple edge/center alignment to several space-distribution modes. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Main-axis alignment** β€” `justify-content` controls how flex items are positioned along the main-axis (horizontally) inside a flex container. [S1] - **Default is `flex-start`** β€” items align at the beginning of the container unless another value is set. [S1] - **Two families of values** β€” positional (`center`, `flex-start`, `flex-end`) and space-distribution (`space-around`, `space-between`, `space-evenly`). [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Apply on the container** β€” `justify-content` is always declared on the element with `display: flex`, not on the items. [S1] - **Space distribution choice** β€” pick `space-between` (no outer space), `space-around` (half-size outer space), or `space-evenly` (equal space everywhere) depending on the desired edge gaps. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) The `justify-content` property aligns the flex items along the main-axis (horizontally) within a flex container. [S1] **`center`** β€” aligns the flex items in the center of the container. [S1] ```css .flex-container { display: flex; justify-content: center; } ``` **`flex-start`** β€” aligns the flex items at the beginning of the container (this is default). [S1] ```css .flex-container { display: flex; justify-content: flex-start; } ``` **`flex-end`** β€” aligns the flex items at the end of the container. [S1] ```css .flex-container { display: flex; justify-content: flex-end; } ``` **`space-around`** β€” displays the flex items with space before, between, and after the lines. [S1] ```css .flex-container { display: flex; justify-content: space-around; } ``` **`space-between`** β€” displays the flex items with space between the lines. [S1] ```css .flex-container { display: flex; justify-content: space-between; } ``` **`space-evenly`** β€” displays the flex items with equal space around them. [S1] ```css .flex-container { display: flex; justify-content: space-evenly; } ``` ## πŸ› οΈ 적용 사둀 (Applied in summary) The page's own examples apply each value to a `.flex-container` declared with `display: flex`. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Align flex items on the main-axis (language: CSS): ```css .flex-container { display: flex; justify-content: center; /* or flex-start | flex-end | space-around | space-between | space-evenly */ } ``` ## βš–οΈ 비ꡐ 및 선택 κΈ°μ€€ (Comparison & decision criteria) - **`space-between`** β€” no space before the first or after the last item; full gaps only between items. [S1] - **`space-around`** β€” space before, between, and after the lines (outer gaps are half the inner gaps). [S1] - **`space-evenly`** β€” equal space around every item, including the container edges. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (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 Align Items]], [[CSS Flex Items]], [[CSS Flexbox Responsive]] - **μ°Έμ‘° λ§₯락:** Referenced whenever positioning flex items horizontally along the main-axis of a flex container. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Flexbox Justify Content β€” https://www.w3schools.com/css/css3_flexbox_container_justify.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Flexbox Justify Content" page (Astra wiki-curation, P-Reinforce v3.1 format).