1cfd3bbb56
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고, Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
3.4 KiB
3.4 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-fixed-menu | How To - Fixed Menu | Web_Recipes | draft | conceptual |
|
B | 0.84 | 2026-07-04 | 2026-07-04 |
|
|
HOWTO CSS Fixed Menu
🎯 한 줄 통찰 (One-line insight)
The recipe explicitly warns that a fixed navbar OVERLAYS page content underneath it (since position: fixed removes the element from flow, other content doesn't "know" to leave room for it) — the fix is a manual margin-top on the main content equal to or greater than the navbar's height, meaning every fixed-menu layout requires the developer to keep two separate numbers (navbar height, content margin) in sync by hand, with no built-in mechanism linking them. [S1]
🧠 핵심 개념 (Core concepts)
position: fixed; top: 0;— pins the menu to the top of the VIEWPORT, staying visible during scroll. [S1]- Overlay problem — a fixed element doesn't push other content down; without compensation, the fixed menu covers the top of the page content. [S1]
- Manual
margin-topfix — the main content block needsmargin-topat least equal to the navbar's rendered height to avoid being hidden underneath it. [S1] - Bottom variant — swapping
top: 0forbottom: 0creates a fixed BOTTOM menu instead, with the equivalent fix beingmargin-bottomon the main content. [S1]
📖 세부 내용 (Details)
- Fixed top menu:
.navbar { position: fixed; top: 0; width: 100%; overflow: hidden; background-color: #333; } .navbar a { float: left; padding: 14px 16px; color: #f2f2f2; } .main { margin-top: 30px; }. [S1] - Fixed bottom menu:
.navbar { position: fixed; bottom: 0; width: 100%; } .main { margin-bottom: 30px; }. [S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
없음 — 신규 레시피, 기존 문서와 모순되는 내용 없음.
🛠️ 적용 사례 (Applied in summary)
Home/News/Contact 링크가 담긴 상단 고정 메뉴를 만들고, 콘텐츠가 가려지지 않도록 margin-top을 추가하는 예제가 원문에서 직접 제시됨. [S1]
💻 코드 패턴 (Code patterns)
Fixed top navbar requiring a manual content offset (CSS):
.navbar {
position: fixed;
top: 0;
width: 100%;
background-color: #333;
}
.main {
margin-top: 30px; /* must match or exceed navbar height */
}
✅ 검증 상태 및 신뢰도
- 상태: draft
- 검증 단계: conceptual
- 출처 신뢰도: B (W3Schools — widely used educational reference)
- 신뢰 점수: 0.84
- 중복 검사 결과: 신규 생성 (New discovery)
🔗 지식 그래프 (Knowledge Graph)
- 상위/루트: W3Schools HOW TO
- 관련 개념: HOWTO CSS Fixed Footer, HOWTO CSS Fixed Sidebar, HOWTO JS Navbar Sticky
- 참조 맥락: CSS Layout & Positioning 섹션.
📚 출처 (Sources)
- [S1] W3Schools — How To - Fixed Menu — https://www.w3schools.com/howto/howto_css_fixed_menu.asp
📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "How To - Fixed Menu" recipe (Astra wiki-curation, P-Reinforce v3.1 format).