I'm using angular + angular material, but I think this question is more general. I have a sidenav to the left and in all the right I display a table with many rows, the problem is that if I try to scroll the table actually the whole page is scrolling, moving the sidenav as well. What I want is to scroll only the table and the rest to be fixed. I spent a lot of time but can't arrive to a solution. thanks
This is the code, if you are not familiar with angular material, md-content as far as I know should be the same as a div element. layout="row" means that the children of this element should be positioned as a row.
<link rel="stylesheet" href="main/main.css">
<md-content layout="row">
<md-content>
<md-sidenav style="height: 100%" class="md-sidenav-left md-whiteframe-z2" md-component-id="left" md-is-locked-open="true">
<md-toolbar style="min-height: 1px; height: 50px" class="md-theme-indigo">
<h3 class="md-toolbar-tools">Your Library</h3>
</md-toolbar>
<md-content layout="column" layout-padding flex>
<md-list>
<md-list-item class="md-1-line">
<md-button class="md-primary md-hue-1" ng-click="showSongs()">Songs</md-button>
</md-list-item>
<md-list-item class="md-1-line">
<md-button class="md-primary md-hue-1" ng-click="getArtists()">Artists</md-button>
</md-list-item>
<md-list-item class="md-1-line">
<md-button class="md-primary md-hue-1" ng-click="getAlbums()">Albums</md-button>
</md-list-item>
<md-list-item class="md-1-line">
<md-button class="md-primary md-hue-1">Playlists</md-button>
</md-list-item>
<md-divider ></md-divider>
<md-list-item class="md-1-line">
<md-button class="md-primary md-hue-1">Upload</md-button>
</md-list-item>
<md-list-item class="md-1-line">
<md-button class="md-primary md-hue-1">Download</md-button>
</md-list-item>
</md-list>
</md-content>
</md-sidenav>
</md-content>
<md-content layout="column" layout-padding flex>
<md-content ng-show="showSongsList">
<div ng-include="'main/songsList.html'"></div>
</md-content>
<md-content ng-show="showArtists">
<div ng-include="artistsTemplate.url"></div>
</md-content>
<md-content ng-show="showAlbums">
<div ng-include="albumsTemplate.url"></div>
</md-content>
</md-content>
</md-content>
<md-content ng-include="'navBar.html'"></md-content>
<md-content ng-include="'navBarBottom.html'"></md-content>
Basically the behaviour I'm looking for is something like this: http://codepen.io/zavoloklom/pen/dIgco selecting "Stacked on the left" in sidebar position dropdown, but this example is not for the library I'm using.