Files
2nd/10_Wiki/Topic_CSS/CSS_Vertical_Align.md
T
koriweb 9609c04755 docs(10_Wiki): W3Schools 위키화 — HTML/CSS/JavaScript(core)
W3Schools 튜토리얼을 P-Reinforce v3.1 포맷으로 위키화(영어 본문, 한/영 섹션 헤더).
- Topic_HTML: 59문서 (튜토리얼+예제, 레퍼런스/메타 제외)
- Topic_CSS: 190문서 (메인 + Advanced/Flexbox/Grid/RWD 전체)
- Topic_JavaScript: 120문서 (코어 언어; Temporal/DOM상세/BOM/WebAPI/AJAX/jQuery/Graphics 등은 후속)
각 폴더 00_INDEX.md(MOC) 포함. 코드 verbatim, 미확인분은 "Not found in source" 표기.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 19:21:18 +09:00

4.6 KiB

id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
id title category status verification_status canonical_id aliases duplicate_of source_trust_level confidence_score created_at updated_at review_reason merge_history tags raw_sources applied_in github_commit
css-vertical-align CSS Vertical Align Frontend draft conceptual
vertical align
vertical centering
flexbox center
grid place-items
transform translate center
B 0.89 2026-06-23 2026-06-23
css
web
frontend
w3schools
alignment
flexbox
grid
https://www.w3schools.com/css/css_align_vertical.asp

CSS Vertical Align

🎯 한 줄 통찰 (One-line insight)

Modern CSS centers content vertically with three approaches — Flexbox (align-items: center), Grid (place-items: center), or Position + Transform (top/left: 50% with translate(-50%, -50%)) — the last being the common technique for elements of unknown or dynamic dimensions. [S1]

🧠 핵심 개념 (Core concepts)

  • Flexbox vertical centeringdisplay: flex with justify-content: center and align-items: center centers content within a sized container. [S1]
  • Grid vertical centeringdisplay: grid with place-items: center achieves the same centering effect. [S1]
  • Position + Transformposition: absolute with top: 50%, left: 50%, and transform: translate(-50%, -50%) centers content. [S1]
  • Use Position + Transform for unknown sizes — it is a common technique when dealing with elements of unknown or dynamic dimensions. [S1]
  • Container setup — the examples use a 200px-height container with a 3px solid green border. [S1]

🧩 추출된 패턴 (Extracted patterns)

  • Flexbox both-axis centerdisplay: flex; justify-content: center; align-items: center;. [S1]
  • Grid one-liner centerdisplay: grid; place-items: center;. [S1]
  • Translate -50% center — absolutely position the child at 50%/50% then pull it back by half its own size with translate(-50%, -50%). [S1]

📖 세부 내용 (Details)

Center Align with Flexbox [S1]

.center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  border: 3px solid green;
}

Center Align with Grid [S1]

.center {
  display: grid;
  place-items: center;
  height: 200px;
  border: 3px solid green;
}

Center Align with position and transform For elements of unknown or dynamic dimensions, this is a common technique. The example sets margin: 0 on the paragraph and centers it: [S1]

.container p {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

The page directs readers to the 2D Transforms chapter for a deeper understanding of the transform property. [S1]

🛠️ 적용 사례 (Applied in summary)

The page's own applied examples are vertically centering content with Flexbox, with Grid (place-items), and with Position + Transform inside a 200px-height bordered container. No external project/commit applications found in the source.

💻 코드 패턴 (Code patterns)

Position + transform centering (language: CSS):

.container p {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

⚖️ 비교 및 선택 기준 (Comparison & decision criteria)

  • Flexbox vs Grid vs Position+Transform — Flexbox and Grid are modern container-driven techniques for vertical centering; Position + Transform is the common choice when the element has unknown or dynamic dimensions because translate(-50%, -50%) offsets by the element's own measured size. [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)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-06-23: Initial draft synthesized from the W3Schools "CSS Vertical Align" page (Astra wiki-curation, P-Reinforce v3.1 format).