--- id: w3css-panels title: "W3CSS Panels" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["w3-panel", "W3.CSS ν¨λ"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.9 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["w3css", "css-framework", "w3schools", "panels"] raw_sources: ["https://www.w3schools.com/w3css/w3css_panels.asp"] applied_in: [] github_commit: "" --- # [[W3CSS Panels]] ## π― ν μ€ ν΅μ°° (One-line insight) `w3-panel` is just `w3-container` plus 16px top/bottom margin β one small structural difference that makes it the base class for FOUR distinct UI patterns (notes, quotes, alerts, cards) purely by combining it with different color/style modifier classes, rather than needing four separate component classes. [S1] ## π§ ν΅μ¬ κ°λ (Core concepts) - **`w3-panel`** β adds 16px top/bottom margin AND 16px left/right padding (container + vertical spacing). [S1] - **Notes** β panel + pale color (e.g. `w3-pale-green`). [S1] - **Quotes** β panel + `w3-leftbar w3-sand w3-xxlarge w3-serif`. [S1] - **Alerts** β panel + strong/saturated color (e.g. plain `w3-red`). [S1] - **Cards** β panel + `w3-card-4`. [S1] - **Show/hide via inline `onclick`** β no JS file needed; `this.parentElement.style.display='none'` closes a panel; `document.getElementById(...).style.display='block'` reopens it. [S1] ## π μΈλΆ λ΄μ© (Details) - Basic panel: `
I am a panel.
...
Click on the X to close this panel.