I am using Angular w/ Angular Material and Flex Layout
I am attempting to create a layout for a web application that is exactly like this site. Notice the fixed header, fixed sidebar, fixed content pain. No browser scrolling is used, only div scrolling and fits perfectly in the browser viewport.
Here is the html I am using to give me my basic structure:
<md-toolbar color="primary">
<span>Application Title</span>
</md-toolbar>
<md-sidenav-container>
<md-sidenav mode="side" opened="true">Drawer content</md-sidenav>
<div class="my-content">Main content</div>
</md-sidenav-container>
Additionally I set the following styles:
html, body {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
md-sidenav-container, .main-content {
margin: 0;
width: 100%;
height: 100%;
}
I noticed that without the toolbar on the page everything works perfectly. So then I added a padding-bottom: 64px; to the md-sidenav-container, .main-content classes. It seems like it fixed it for the content, but not the sidenav. The sidenav scrollbar still goes way below the browser window.
I do have flex-layout installed to my Angular app if anyone can tell me how to do it with the flex directives. Otherwise, plain css would be fine too.