--- id: howto-css-button-split title: "How To - Split Buttons" category: "Web_Recipes" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["split button dropdown CSS"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.82 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["howto", "css", "w3schools", "buttons", "dropdown"] raw_sources: ["https://www.w3schools.com/howto/howto_css_button_split.asp"] applied_in: [] github_commit: "" --- # [[HOWTO CSS Button Split]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) A "split button" is really just a dropdown menu (`.dropdown:hover .dropdown-content { display: block; }`) whose TRIGGER happens to be a second small button with a caret icon sitting immediately next to a normal action button β€” the dropdown-reveal mechanism itself (hidden content shown on `:hover`, positioned `absolute` inside a `relative`/`inline-block` wrapper) is identical to any other CSS-only dropdown; the only distinguishing feature is the visual split between "primary action" (left button) and "reveal more options" (right arrow button). [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Font Awesome icon library** β€” loaded via a `` to a CDN stylesheet, providing the caret-down icon (`fa fa-caret-down`) used as the dropdown trigger. [S1] - **`.dropdown { position: absolute; display: inline-block; }`** β€” wraps the caret button and the dropdown content together as a positioning anchor. [S1] - **`.dropdown-content { display: none; position: absolute; }`** β€” the hidden menu, absolutely positioned relative to `.dropdown`. [S1] - **`.dropdown:hover .dropdown-content { display: block; }`** β€” the reveal mechanism: hovering the wrapper (which contains the caret button) shows the menu β€” a pure CSS `:hover` toggle, no JavaScript. [S1] - **Shared hover state across both buttons** β€” `.btn:hover, .dropdown:hover .btn { background-color: #0b7dda; }` keeps the main button's color in sync when the dropdown is open, even though the dropdown itself is only hovered via the caret button. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - HTML: ` `. [S1] - CSS reveal: `.dropdown:hover .dropdown-content { display: block; }`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) μ—†μŒ β€” μ‹ κ·œ λ ˆμ‹œν”Ό, κΈ°μ‘΄ λ¬Έμ„œμ™€ λͺ¨μˆœλ˜λŠ” λ‚΄μš© μ—†μŒ. ## πŸ› οΈ 적용 사둀 (Applied in summary) "Button" μ˜†μ— 캐럿 μ•„μ΄μ½˜ λ²„νŠΌμ„ λΆ™μ—¬ 마우슀λ₯Ό 올리면 Link 1/2/3 λ“œλ‘­λ‹€μš΄μ΄ λ‚˜νƒ€λ‚˜λŠ” μ˜ˆμ œκ°€ μ›λ¬Έμ—μ„œ 직접 μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Pure-CSS hover dropdown attached to a caret button (CSS): ```css .dropdown { position: absolute; display: inline-block; } .dropdown-content { display: none; position: absolute; } .dropdown:hover .dropdown-content { display: block; } ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference) - **μ‹ λ’° 점수:** 0.82 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[W3Schools HOW TO]] - **κ΄€λ ¨ κ°œλ…:** [[HOWTO CSS Dropdown]], [[HOWTO CSS Dropdown Navbar]], [[HOWTO CSS Button Group]] - **μ°Έμ‘° λ§₯락:** CSS Buttons μ„Ήμ…˜. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” How To - Split Buttons β€” https://www.w3schools.com/howto/howto_css_button_split.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "How To - Split Buttons" recipe (Astra wiki-curation, P-Reinforce v3.1 format).