--- id: howto-css-responsive-floats title: "How To - Responsive Floats" category: "Web_Recipes" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["media query float direction"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.8 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["howto", "css", "w3schools", "layout", "float", "media-queries"] raw_sources: ["https://www.w3schools.com/howto/howto_css_responsive_floats.asp"] applied_in: [] github_commit: "" --- # [[HOWTO CSS Responsive Floats]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) This recipe applies media queries not to WIDTH (the usual target in this cookbook's other layout recipes) but to the `float` DIRECTION itself β€” two complementary classes (`.float-right-sm` for small screens, `.float-right-lg` for large) each activate at opposite ends of a 768/769px split, showing that media queries can toggle ANY CSS property conditionally, not just sizing. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Conditional `float` via media query** β€” `@media (max-width: 768px) { .float-right-sm { float: right; } }` and `@media (min-width: 769px) { .float-right-lg { float: right; } }` each apply float only within their respective breakpoint range. [S1] - **Complementary breakpoints** β€” `max-width: 768px` and `min-width: 769px` are deliberately adjacent (no gap, no overlap) so exactly one rule is ever active at a given viewport width. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Full example: two separate classes, each with its own media query scoping float:right to a specific screen-width range. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) μ—†μŒ β€” μ‹ κ·œ λ ˆμ‹œν”Ό, κΈ°μ‘΄ λ¬Έμ„œμ™€ λͺ¨μˆœλ˜λŠ” λ‚΄μš© μ—†μŒ. ## πŸ› οΈ 적용 사둀 (Applied in summary) ν˜„μž¬ 발견된 μ‹€μ œ 적용 사둀가 μ—†μŠ΅λ‹ˆλ‹€ β€” ν™”λ©΄ 폭에 따라 float λ°©ν–₯을 λ‹€λ₯΄κ²Œ μ μš©ν•˜λŠ” μ΅œμ†Œ μ˜ˆμ œκ°€ μ›λ¬Έμ—μ„œ μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Screen-width-conditional float direction (CSS): ```css @media (max-width: 768px) { .float-right-sm { float: right; } } @media (min-width: 769px) { .float-right-lg { float: right; } } ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference) - **μ‹ λ’° 점수:** 0.80 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[W3Schools HOW TO]] - **κ΄€λ ¨ κ°œλ…:** [[HOWTO CSS Mixed Columns]], [[HOWTO CSS Media Query Breakpoints]] - **μ°Έμ‘° λ§₯락:** CSS Layout & Positioning μ„Ήμ…˜. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” How To - Responsive Floats β€” https://www.w3schools.com/howto/howto_css_responsive_floats.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "How To - Responsive Floats" recipe (Astra wiki-curation, P-Reinforce v3.1 format).