Footer
Materialize is a modern responsive CSS framework based on Material Design by Google.
Copied!
content_copy
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 auto;
}
Note: We use flexbox to structure our html so that the footer is always on the bottom of the page. It is important to keep the structure of your page within the 3
HTML5 tags:
header
, main
,
footer
Copied!
content_copy
A sticky footer always stays on the bottom of the page regardless of how little content is on the page. However, this footer will be pushed down if there is a lot of content, so it is different from a fixed footer. Add the following code to your CSS file.
Note: This may cause issues in Internet Explorer which has weak support for flexbox.
Copied!
content_copy
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 auto;
}