--- id: howto-css-split-screen title: "How To - Split Screen 1/2" category: "Web_Recipes" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["50/50 split layout CSS"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.83 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["howto", "css", "w3schools", "layout", "position"] raw_sources: ["https://www.w3schools.com/howto/howto_css_split_screen.asp"] applied_in: [] github_commit: "" --- # [[HOWTO CSS Split Screen]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) Instead of floating two 50%-width columns (the technique used in `[[HOWTO CSS Two Columns]]`), this recipe fixes BOTH halves to the viewport independently β€” `.split { position: fixed; height: 100%; width: 50%; }` combined with `.left { left: 0; }` / `.right { right: 0; }` pins each half to an opposite screen edge, meaning the two halves never scroll and always occupy exactly half the viewport regardless of page content length, which float-based columns cannot guarantee (floated columns follow document flow and CAN scroll). [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`position: fixed; width: 50%; height: 100%;`** β€” anchors each half to the viewport, not the document flow, so both halves are always visible and exactly half-width. [S1] - **`left: 0` / `right: 0`** β€” pins one half to the left edge, the other to the right edge, with no gap or overlap. [S1] - **Centered content inside each half** β€” reuses the absolute+transform centering technique (`position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);`) already seen in `[[HOWTO CSS Center Vertical]]`, applied per-half. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Split halves: `.split { height: 100%; width: 50%; position: fixed; z-index: 1; top: 0; overflow-x: hidden; } .left { left: 0; background-color: #111; } .right { right: 0; background-color: red; }`. [S1] - Centered content: `.centered { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; } .centered img { width: 150px; border-radius: 50%; }`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) - **fixed 포지셔닝이 float 기반 2단 컬럼과 근본적으둜 닀름**: `[[HOWTO CSS Two Columns]]`의 float 기반 2단 λ ˆμ΄μ•„μ›ƒμ€ λ¬Έμ„œ 흐름을 따라 μŠ€ν¬λ‘€λ˜μ§€λ§Œ, 이 λ ˆμ‹œν”ΌλŠ” 두 μ ˆλ°˜μ„ 각각 position:fixed둜 λ·°ν¬νŠΈμ— κ³ μ •ν•΄ 항상 ν™”λ©΄ μ ˆλ°˜μ”©μ„ μ°¨μ§€ν•˜κ³  μŠ€ν¬λ‘€λ˜μ§€ μ•ŠλŠ”λ‹€λŠ” 점이 핡심 차이둜 확인됨. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) μ™Όμͺ½μ— μ—¬μ„± 아바타, 였λ₯Έμͺ½μ— 남성 아바타λ₯Ό 각각 λ°°μΉ˜ν•΄ 화면을 μ •ν™•νžˆ 반으둜 λ‚˜λˆ„λŠ” μ˜ˆμ œκ°€ μ›λ¬Έμ—μ„œ 직접 μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Two viewport-fixed halves, each pinned to an opposite edge (CSS): ```css .split { height: 100%; width: 50%; position: fixed; top: 0; } .left { left: 0; background-color: #111; } .right { right: 0; background-color: red; } ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference) - **μ‹ λ’° 점수:** 0.83 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[W3Schools HOW TO]] - **κ΄€λ ¨ κ°œλ…:** [[HOWTO CSS Two Columns]], [[HOWTO CSS Center Vertical]], [[HOWTO CSS Fixed Sidebar]] - **μ°Έμ‘° λ§₯락:** CSS Layout & Positioning μ„Ήμ…˜. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” How To - Split Screen 1/2 β€” https://www.w3schools.com/howto/howto_css_split_screen.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "How To - Split Screen 1/2" recipe (Astra wiki-curation, P-Reinforce v3.1 format).