Прилепить footer к низу страницы
Заметочка о том как прилепить футер к низу страницы, а то всякое бывает, могу и забыть 🙂
Работает в: Internet Explorer 5 и выше, Firefox, Safari, Opera и так далее.
CSS
* {
margin: 0;
}
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
height: 142px; /* .push must be the same height as .footer */
}
Ну и сам html
<html>
<head>
<link rel="stylesheet" href="layout.css" ... />
</head>
<body>
<div class="wrapper">
<p>Супер-мего контент.</p>
<div class="push"></div>
</div>
<div class="footer">
<p>Копирайт (c)</p>
</div>
</body>
</html>
