0 works

Footer always at the bottom


dashboard+ Project

Posted by @360designer #css

Code snippet:

body {
	width: 100%;
	margin: 0;
	display: flex;
	min-height: 100vh; /*always have atleast the height of viewport*/
}

.main {
	display: flex;
	flex-direction: column;
}
.main__section {
	flex-grow: 1; /*magical line*/
}
.main__footer {
	margin-top: auto;
}



content_copyCopy to Clipboard

Code snippet source:

https://codepen.io/ananyaneogi/pen/WNerMbE

>> Browse more code snippets

more_vert