--- id: howto-css-equal-height title: "How To - Equal Height" category: "Web_Recipes" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["equal height columns CSS", "display table-cell columns"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.85 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["howto", "css", "w3schools", "layout", "flexbox"] raw_sources: ["https://www.w3schools.com/howto/howto_css_equal_height.asp"] applied_in: [] github_commit: "" --- # [[HOWTO CSS Equal Height]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) The `display: table` / `display: table-cell` trick repurposes HTML TABLE layout behavior (where cells in the same row always match the row's tallest cell) onto plain `
`s WITHOUT using an actual `` element β€” an old technique that pre-dates Flexbox, and the recipe explicitly shows Flexbox (`display: flex; flex: 1;`) as the modern equivalent with an explicit caveat: Flexbox isn't supported in IE10 and earlier, which is presumably why the table-display trick is taught FIRST despite being the more obscure approach. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`display: table` / `display: table-cell`** β€” makes a `
` container and its `
` children behave like a `
` and `
`s, inheriting the automatic row-height-matching behavior of real tables, without any table markup. [S1] - **Responsive stacking via media query** β€” `@media (max-width: 600px) { .col { display: block; width: 100%; } }` switches the table-cell columns to stacked blocks on narrow screens. [S1] - **Flexbox alternative** β€” `.col-container { display: flex; } .col { flex: 1; }` achieves the same equal-height effect with less code, but is unsupported in IE10 and earlier. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Table-display method: `.col-container { display: table; width: 100%; } .col { display: table-cell; }`. [S1] - Flexbox method: `.col-container { display: flex; width: 100%; } .col { flex: 1; padding: 16px; }`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) μ—†μŒ β€” μ‹ κ·œ λ ˆμ‹œν”Ό, κΈ°μ‘΄ λ¬Έμ„œμ™€ λͺ¨μˆœλ˜λŠ” λ‚΄μš© μ—†μŒ. ## πŸ› οΈ 적용 사둀 (Applied in summary) μ„œλ‘œ λ‹€λ₯Έ ν…μŠ€νŠΈ 길이λ₯Ό κ°€μ§„ 3개 컬럼이 항상 κ°€μž₯ 높은 μ»¬λŸΌμ— 맞좰 λ™μΌν•œ λ†’μ΄λ‘œ λ Œλ”λ§λ˜λŠ” μ˜ˆμ œκ°€ μ›λ¬Έμ—μ„œ 직접 μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Table-display trick vs. Flexbox for equal-height columns (CSS): ```css /* Table-display trick -- works in older browsers */ .col-container { display: table; width: 100%; } .col { display: table-cell; } /* Flexbox -- modern, not supported in IE10 and earlier */ .col-container-flex { display: flex; width: 100%; } .col-flex { flex: 1; padding: 16px; } ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference) - **μ‹ λ’° 점수:** 0.85 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[W3Schools HOW TO]] - **κ΄€λ ¨ κ°œλ…:** [[HOWTO CSS Four Columns]], [[HOWTO CSS Clearfix]], [[HOWTO CSS Mixed Columns]] - **μ°Έμ‘° λ§₯락:** CSS Layout & Positioning μ„Ήμ…˜. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” How To - Equal Height β€” https://www.w3schools.com/howto/howto_css_equal_height.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "How To - Equal Height" recipe (Astra wiki-curation, P-Reinforce v3.1 format).