How to create a sticky footer

|html,body{
height: 100%;
}
body{
display: flex;
flex-direction: column;
}
<body>
<main>
This is the main section
</main>
<footer>
This is the footer
</footer>
</body>
|main{
background: lightgreen;
flex: 1 0 auto;
}
footer{
background: lightblue;
flex-shrink: 0;
height: 60px;
}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store