--- id: howto-css-search-button title: "How To - Search Button" category: "Web_Recipes" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["search bar with icon button CSS"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.81 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["howto", "css", "w3schools", "buttons", "forms"] raw_sources: ["https://www.w3schools.com/howto/howto_css_search_button.asp"] applied_in: [] github_commit: "" --- # [[HOWTO CSS Search Button]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) `border-left: none;` on the button reuses the EXACT double-border fix already established for adjacent buttons in `[[HOWTO CSS Button Group]]`'s `:not(:last-child)` pattern β€” here applied to just TWO elements (a text input and a button, both floated and both bordered) sitting flush against each other, where an 80%/20% width split ensures the input dominates visually while the icon button stays compact. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`float: left` on both input and button** β€” `width: 80%` for the search input, `width: 20%` for the button, summing to 100% β€” same N-column formula pattern as the layout recipes. [S1] - **`border-left: none` on the button** β€” prevents a doubled border where the input's right edge meets the button's left edge, the same principle as the button group's `:not(:last-child)` fix, just applied between two DIFFERENT element types rather than a repeated list of buttons. [S1] - **`form::after` clearfix** β€” the standard clearfix, needed because both children are floated. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - `form.example input[type=text] { float: left; width: 80%; } form.example button { float: left; width: 20%; border-left: none; } form.example::after { content: ""; clear: both; display: table; }`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) - **λ²„νŠΌ 그룹의 이쀑 ν…Œλ‘λ¦¬ 제거 원리가 λ‹€λ₯Έ μš”μ†Œ 쑰합에도 적용됨**: `[[HOWTO CSS Button Group]]`의 `:not(:last-child) { border-right: none; }`이 λ°˜λ³΅λ˜λŠ” λ²„νŠΌλ“€ μ‚¬μ΄μ˜ 이쀑 ν…Œλ‘λ¦¬λ₯Ό λ§‰μ•˜λ‹€λ©΄, 이 λ ˆμ‹œν”ΌλŠ” inputκ³Ό buttonμ΄λΌλŠ” μ„œλ‘œ λ‹€λ₯Έ 두 μš”μ†Œ μ‚¬μ΄μ˜ 접합뢀에 λ™μΌν•œ 원리(`border-left: none`)λ₯Ό μ μš©ν•œλ‹€λŠ” 점이 확인됨. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) 검색어 μž…λ ₯μ°½(80%)κ³Ό 돋보기 μ•„μ΄μ½˜ λ²„νŠΌ(20%)을 이쀑 ν…Œλ‘λ¦¬ 없이 ν•˜λ‚˜λ‘œ 이어뢙인 검색 폼 μ˜ˆμ œκ°€ μ›λ¬Έμ—μ„œ 직접 μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Search input + button joined without a doubled border (CSS): ```css form.example input[type=text] { float: left; width: 80%; border: 1px solid grey; } form.example button { float: left; width: 20%; border: 1px solid grey; border-left: none; } form.example::after { content: ""; clear: both; display: table; } ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference) - **μ‹ λ’° 점수:** 0.81 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[W3Schools HOW TO]] - **κ΄€λ ¨ κ°œλ…:** [[HOWTO CSS Button Group]], [[HOWTO CSS Searchbar]], [[HOWTO JS Search Menu]] - **μ°Έμ‘° λ§₯락:** CSS Buttons μ„Ήμ…˜μ˜ λ§ˆμ§€λ§‰ 두 챕터 쀑 ν•˜λ‚˜ β€” Sidenav Buttons둜 이어짐. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” How To - Search Button β€” https://www.w3schools.com/howto/howto_css_search_button.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "How To - Search Button" recipe (Astra wiki-curation, P-Reinforce v3.1 format).