Also possible using grid, obviously.
Something like this, written on my mobile phone, thus not tested, but that should stick the footer to the viewport's bottom.
<div class="content">Some content not filling the viewport</div> <div class="footer">Footer</div>
html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } body { min-height: 100vh; margin: 0; display: grid; grid-template-rows: 1fr auto; } .footer { background: #000; color: #fff; grid-row: 2 / 3; }
That was really easy. Thank you so much
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Also possible using grid, obviously.
Something like this, written on my mobile phone, thus not tested, but that should stick the footer to the viewport's bottom.
That was really easy. Thank you so much