Med Amine
Med Amine

Reputation: 31

Angular material md-tab scrolling content

I'm trying to set a scrollable content with overflow-y: scroll css style in a md-tab but it's not working The scrollbar is displayed but it's not activated

I enabled it with fixing a height but I want it to fit the content height dynamically

how can I solve this issue ?

Upvotes: 2

Views: 2521

Answers (1)

Nehal
Nehal

Reputation: 13297

I am guessing you are trying to keep the tab header out of the scrollable area and make the tab content scrollable only. If that's the case you can set height of tab content with vh. That will keep the tab labels in view and make the height dynamic and content scrollable.

css:

>>> .mat-tab-body-content {
    height: 90vh !important;
}

demo

If this is not what you are looking for, please explain the question little bit further or add some code.

Upvotes: 1

Related Questions