---
id: howto-css-table-center
title: "How To - Center Tables"
category: "Web_Recipes"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["center table CSS"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.8
created_at: 2026-07-04
updated_at: 2026-07-04
review_reason: ""
merge_history: []
tags: ["howto", "css", "w3schools", "tables", "centering"]
raw_sources: ["https://www.w3schools.com/howto/howto_css_table_center.asp"]
applied_in: []
github_commit: ""
---
# [[HOWTO CSS Table Center]]
## π― ν μ€ ν΅μ°° (One-line insight)
This is the exact same `margin-left: auto; margin-right: auto;` mechanism used to center a page's content wrapper in `[[HOWTO CSS Center Website]]`, applied to a `
` instead β and the page explicitly flags the same underlying constraint that recipe relied on: a `` set to `width: 100%` CANNOT be centered, because auto margins only distribute space the element ISN'T already using, and a full-width table leaves none. [S1]
## π§ ν΅μ¬ κ°λ
(Core concepts)
- **`margin-left: auto; margin-right: auto;`** β centers a table horizontally, the SAME mechanism as centering any block-level element with a constrained width. [S1]
- **Width constraint required** β like the website-centering recipe, this only works if the table does NOT span `width: 100%`. [S1]
## π μΈλΆ λ΄μ© (Details)
- `.center { margin-left: auto; margin-right: auto; }` applied to ``. [S1]
## βοΈ λͺ¨μ λ° μ
λ°μ΄νΈ (Contradictions & updates)
- **μΉμ¬μ΄νΈ μ€μ μ λ ¬κ³Ό λμΌν μ리**: `[[HOWTO CSS Center Website]]`μμ νμΈλ "margin:autoλ λͺ
μμ ν μ μ½μ΄ μμ΄μΌ λμνλ€"λ κ·μΉμ΄ ν
μ΄λΈμλ λμΌνκ² μ μ©λλ€λ μ μ΄ νμΈλ¨ β width:100% ν
μ΄λΈμ μ€μ μ λ ¬ν μ¬λ°± μμ²΄κ° μμ΄ λΆκ°λ₯. [S1]
## π οΈ μ μ© μ¬λ‘ (Applied in summary)
Firstname/Lastname/Age 컬λΌμ κ°μ§ ν
μ΄λΈμ margin:autoλ‘ νμ΄μ§ μ€μμ λ°°μΉνλ μμ κ° μλ¬Έμμ μ§μ μ μλ¨. [S1]
## π» μ½λ ν¨ν΄ (Code patterns)
Centering a table β only works without width:100% (CSS):
```css
.center {
margin-left: auto;
margin-right: auto;
}
```
## β
κ²μ¦ μν λ° μ λ’°λ
- **μν:** draft
- **κ²μ¦ λ¨κ³:** conceptual
- **μΆμ² μ λ’°λ:** B (W3Schools β widely used educational reference)
- **μ λ’° μ μ:** 0.80
- **μ€λ³΅ κ²μ¬ κ²°κ³Ό:** μ κ· μμ± (New discovery)
## π μ§μ κ·Έλν (Knowledge Graph)
- **μμ/루νΈ:** [[W3Schools HOW TO]]
- **κ΄λ ¨ κ°λ
:** [[HOWTO CSS Center Website]], [[HOWTO CSS Table Full Width]]
- **μ°Έμ‘° λ§₯λ½:** CSS Layout & Positioning μΉμ
.
## π μΆμ² (Sources)
- [S1] W3Schools β How To - Center Tables β https://www.w3schools.com/howto/howto_css_table_center.asp
## π λ³κ²½ μ΄λ ₯ (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "How To - Center Tables" recipe (Astra wiki-curation, P-Reinforce v3.1 format).