--- id: w3css-padding title: "W3CSS Padding" category: "Programming_Language" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["w3-padding classes", "W3.CSS ν¨λ©"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["w3css", "css-framework", "w3schools", "padding"] raw_sources: ["https://www.w3schools.com/w3css/w3css_padding.asp"] applied_in: [] github_commit: "" --- # [[W3CSS Padding]] ## π― ν μ€ ν΅μ°° (One-line insight) W3.CSS splits padding into TWO separate class families with different behavior β "number" classes (`w3-padding-16` through `w3-padding-64`) add ONLY top/bottom padding, while "size" classes (`w3-padding-small`/`w3-padding`/`w3-padding-large`) add ALL FOUR sides at different top/bottom vs. left/right ratios β meaning the choice of class family determines whether you're adjusting vertical space alone or the whole box uniformly. [S1] ## π§ ν΅μ¬ κ°λ (Core concepts) - **Padding-number classes** β `w3-padding-16/24/32/48/64` add ONLY top+bottom padding at that pixel value. [S1] - **Padding-size classes** β `w3-padding-small` (4px top/bottom, 8px left/right), `w3-padding` (8px/16px), `w3-padding-large` (12px/24px) β all FOUR sides, with left/right always double the top/bottom value. [S1] ## π μΈλΆ λ΄μ© (Details) - Number class: `
I have 16px top and bottom padding.
I have 12px top and bottom padding and 24px left and right padding.
12px top/bottom, 24px left/right β left/right is always 2x top/bottom.