To create a layout where the header and footer remain sticky while the content has a minimum height and shows a scrollbar when the viewport is too small, I found success with this codepen: http://codepen.io/DlafCreative/pen/wzdOEN inspired by another source.
However, I ran into issues with the HTML markup not fitting well with the Angular2 framework I am using. The <header>
being on the same level as <main>
, and the <footer>
outside <prop-wrapper>
.
In my application, the header needs to stay consistent across all pages, while the footer should be dynamic. Ideally, I would like the <header>
before <prop-wrapper>
and the <footer>
after <main>
as shown in this forked codepen: http://codepen.io/DlafCreative/pen/xEAXxy. This structure would make it easier to define the content.
I am currently struggling to achieve the same behavior with the new markup. Any help or suggestions would be greatly appreciated. Thank you!