--- 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, 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). |