CSS
[CSS] 2단 레이아웃 화면 100% 유지
힘없는염소
2016. 7. 4. 10:00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <!DOCTYPE html> <html lang="ko"> <head> <meta charset="utf-8"> <style> body, html, .wrapper { width: 100%; height: 100%; } .container { position: relative; box-sizing: border-box; padding-top: 50px; width: 100%; height: 100%; background: gray; } .topBox { position: absolute; left: 0; top: 0; width: 100%; height: 50px; background: skyblue; } .bottomBox { position: relative; width: 100%; height: 100%; background: orange; } </style> </head> <body> <div class="wrapper"> <div class="container"> <div class="topBox"></div> <div class="bottomBox"></div> </div> </div> </body> </html> |
반응형