Why is it that when I put margin-top auto on an element of the body, nothing happens, but if I put display flex, the element goes towards the end of the body
Thanks for the reply
body {
margin: 0;
background: #000;
/*display: flex;*/
min-height: 100vh;
}
.footer {
background: #eee;
margin-top: auto;
width: 100%;
padding: 2em;
}
<footer class="footer">
Footer
</footer>