--- id: w3css-bars title: "W3CSS Bars" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["w3-bar", "w3-bar-block", "w3-bar-item", "W3.CSS λ°"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.87 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["w3css", "css-framework", "w3schools", "bars", "navigation"] raw_sources: ["https://www.w3schools.com/w3css/w3css_bars.asp"] applied_in: [] github_commit: "" --- # [[W3CSS Bars]] ## π― ν μ€ ν΅μ°° (One-line insight) `w3-bar` (horizontal) and `w3-bar-block` (vertical) are the exact same conceptual container differing only in ONE class name β meaning every color, hover, button, and responsive technique demonstrated for a horizontal bar transfers identically to a vertical sidebar, so this single chapter is really the foundation for both the later Navigation Bars AND Sidebar chapters. [S1] ## π§ ν΅μ¬ κ°λ (Core concepts) - **`w3-bar`** β horizontal container for bar items. **`w3-bar-block`** β vertical container, same item classes apply. [S1] - **`w3-bar-item`** β provides correct spacing/padding/positioning for each item inside a bar; works on any element (`div`, `a`, etc.). [S1] - **Color + hover-color composability** β any `w3-color` class sets the bar's base color, and any `w3-hover-color` class can be added per-item for a distinct hover color. [S1] - **`w3-button`** β turns bar items (especially `` links) into clickable button-styled elements. [S1] - **`w3-mobile`** β makes bar items responsive (stack/adjust on small screens). [S1] - **`w3-right`** β right-aligns a specific bar item within the bar. [S1] ## π μΈλΆ λ΄μ© (Details) - Horizontal bar: ``. [S1] - Vertical bar (same items, one class swapped): ``. [S1] - Bar as navigation with buttons: ``. [S1] - Right-aligned last item: `Tokyo` as the final child. [S1] ## βοΈ λͺ¨μ λ° μ λ°μ΄νΈ (Contradictions & updates) - νμ¬κΉμ§ λ°κ²¬λ λͺ¨μ μ¬ν μμ (No contradictions found in available sources). ## π οΈ μ μ© μ¬λ‘ (Applied in summary) νμ¬ λ°κ²¬λ μ€μ μ μ© μ¬λ‘κ° μμ΅λλ€ β w3-bar νλμ ν΄λμ€ κ΅μ²΄(w3-bar-block)λ§μΌλ‘ μν/μμ§ λ€λΉκ²μ΄μ μ λͺ¨λ λ§λλ ν¨ν΄μ΄ λ€μ μ±ν°λ€(Navigation, Sidebar)μ κΈ°λ°μ΄ λλ€. [S1] ## π» μ½λ ν¨ν΄ (Code patterns) The same items in horizontal vs vertical bar β only the container class changes (HTML): ```html
``` ## β κ²μ¦ μν λ° μ λ’°λ - **μν:** draft - **κ²μ¦ λ¨κ³:** conceptual - **μΆμ² μ λ’°λ:** B (W3Schools β widely used educational reference, not a primary standards body) - **μ λ’° μ μ:** 0.87 - **μ€λ³΅ κ²μ¬ κ²°κ³Ό:** μ κ· μμ± (New discovery) ## π μ§μ κ·Έλν (Knowledge Graph) - **μμ/루νΈ:** [[W3.CSS Tutorial]] - **κ΄λ ¨ κ°λ :** [[W3CSS Effects]], [[W3CSS Dropdowns]], [[W3CSS Navigation]], [[W3CSS Sidebar]] - **μ°Έμ‘° λ§₯λ½:** Navigation Components μΉμ 첫 νλͺ©μ΄μ κΈ°μ΄ β λλ‘λ€μ΄(Dropdowns) μ±ν°λ‘ μ΄μ΄μ§. ## π μΆμ² (Sources) - [S1] W3Schools β W3.CSS Bars β https://www.w3schools.com/w3css/w3css_bars.asp ## π λ³κ²½ μ΄λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "W3.CSS Bars" page (Astra wiki-curation, P-Reinforce v3.1 format).