Files
2nd/10_Wiki/Dev/Topic_CSS/CSS_Vertical_Align.md
T
Antigravity Agent 1cfd3bbb56 docs(10_Wiki): 위키 구조 정리 — 언어 튜토리얼 카테고리 폴더 제거 + 신규 자산 동기화
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고,
Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
2026-07-05 00:10:59 +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).