html - Google Material Design footer always at the end of the page/ at the bottom -
i facing problem google material design lite. if take @ portfolio example google https://getmdl.io/templates/portfolio/about.html , simulate large screen footer doesn't stay @ bottom. there solution this?
i found 2 similar questions sticky footer. have footer @ end of page , if page scrollable, footer should visible when @ bottom.
you need put set specific min-height
.mdl-grid.portfolio-max-width
,
just like:
/* when navbar big */ .mdl-grid.portfolio-max-width { min-height: calc(100vh - 316px); } /* when navbar small */ .mdl-grid.portfolio-max-width { min-height: calc(100vh - 180px); }
this work.
hope helps!
edit
final solution me:
/* when navbar big */ .mdl-grid.portfolio-max-width { min-height: calc(100vh - 316px); display: block; } /* when navbar small */ .mdl-layout__content.header-is-compact > .mdl-grid.portfolio-max-width { min-height: calc(100vh - 137px); }
and following lines scroll handler in mdl javascript file:
this.content_.classlist.add('header-is-compact'); // following line else if classes removed this.content_.classlist.remove('header-is-compact');
Comments
Post a Comment