Как с помощью CSS прижать footer к низу окна браузера


Пример на флексах

 

Статья с объяснением 5 способов

* {
	margin: 0;
	padding: 0;
}
html,
body {
	height: 100%;
}
.wrapper {
	display: flex;
	flex-direction: column;
	min-height: 100%;
}
.content {
	flex: 1 0 auto;
}
.footer {
	flex: 0 0 auto;
}

 

мой способ

body {
    display: flex;
    flex-direction: column;
    min-height:100vh;
}
<div class="container" style="flex: 1;">

 

<html class="h-100">
<body class="d-flex flex-column h-100">
d-flex flex-column h-100
<main class="flex-shrink-0">
flex-shrink-0