content 높이에 상관없이 footer 하단 고정하는 방법
header, section (content영역), footer 가 main 태그 안에 다 같이 있는 경우
html 구조
<body> <main> <header>Header</header> <section> <p>CONTENT</p> </section> <footer>Footer</footer> </main> </body>
css 적용
<style> html, body { height: 100%; } main { min-height: 100%; position: relative; padding-bottom: 60px; } header { width: 100%; height: 60px; } footer { position: absolute; bottom: 0; width: 100%; height: 60px; } </style>