5

This might be a simple issue, but I'm new to this...

I am trying to have an md-tabs element that takes the entire screen, and have only the tabs' content scroll. Here is an example on jsFiddle

Any ideas? thx!

ValYouW
  • 669
  • 2
  • 9
  • 20

3 Answers3

2

Try this:

<body ng-cloak layout="column" ng-controller="AppController as app">
    <md-toolbar layout="row" class="md-toolbar-tools">
        <h1>Welcome!</h1>
    </md-toolbar>
    <div layout="column" flex>
        <md-tabs md-stretch-tabs="always" flex>
            <md-tab label="Tab1">
                add our larger-than-life content here
            </md-tab>
            <md-tab label="Tab2">
            </md-tab>
       </md-tabs>
    </div>
</body>

Adding the flex attribute to md-tabs will make the content of the inner tabs (md-tab) scrollable.

Ben
  • 21
  • 2
1

Try to add this style to your div element inside md-tab :

div{    
  height: 100px; 
  overflow-y: scroll;
}

Your container must be a fixed size. Also, you can play with overflow property. Read this for more information.

Thanks

flowr
  • 79
  • 5
0

Seems like it was a bug in 0.8.3 that is fixed now in master (commit: 74601d0)

ValYouW
  • 669
  • 2
  • 9
  • 20