Files
2nd/10_Wiki/Dev/Topic_HOWTO/HOWTO_CSS_Button_Group.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

3.3 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
howto-css-button-group How To - Button Group Web_Recipes draft conceptual
btn-group horizontal CSS
B 0.82 2026-07-04 2026-07-04
howto
css
w3schools
buttons
https://www.w3schools.com/howto/howto_css_button_group.asp

HOWTO CSS Button Group

🎯 한 줄 통찰 (One-line insight)

:not(:last-child) { border-right: none; } solves a problem unique to adjacent bordered buttons — floating buttons side by side with individual borders would double up the border between each pair (right edge of one touching the left edge of the next), so this :not() selector strips the right border from every button EXCEPT the last, leaving a single shared-looking seam between buttons instead of a visibly doubled line. [S1]

🧠 핵심 개념 (Core concepts)

  • float: left buttons + clearfix — the same clearfix pattern from the layout recipes, needed here because the button group container would otherwise collapse. [S1]
  • :not(:last-child) { border-right: none; } — prevents double borders between adjacent buttons by removing the right border from all but the final button. [S1]
  • Justified/full-width variant — set the container to width: 100% and give each button an explicit percentage width (33.3% for 3 buttons, 25% for 4) so the group spans the full container width evenly. [S1]

📖 세부 내용 (Details)

  • Horizontal group: .btn-group button { float: left; border: 1px solid green; } .btn-group button:not(:last-child) { border-right: none; } .btn-group:after { content: ""; clear: both; display: table; }. [S1]
  • Justified variant: inline style="width:33.3%" on each of 3 buttons inside a width:100% container. [S1]

⚖️ 모순 및 업데이트 (Contradictions & updates)

없음 — 신규 레시피, 기존 문서와 모순되는 내용 없음.

🛠️ 적용 사례 (Applied in summary)

Apple/Samsung/Sony 버튼 3개를 이중 테두리 없이 나란히 배치하고, 컨테이너 전체 폭에 맞춰 균등 분할하는 justified 버전도 함께 제시됨. [S1]

💻 코드 패턴 (Code patterns)

Button group without doubled borders between buttons (CSS):

.btn-group button {
  float: left;
  border: 1px solid green;
}
.btn-group button:not(:last-child) {
  border-right: none;
}
.btn-group:after {
  content: ""; clear: both; display: table;
}

검증 상태 및 신뢰도

  • 상태: draft
  • 검증 단계: conceptual
  • 출처 신뢰도: B (W3Schools — widely used educational reference)
  • 신뢰 점수: 0.82
  • 중복 검사 결과: 신규 생성 (New discovery)

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-07-04: Initial draft synthesized from the W3Schools "How To - Button Group" recipe (Astra wiki-curation, P-Reinforce v3.1 format).