I'm trying to make the tab
content take up 100% of the available space. but for some reason it is generating a vertical scroll
because apparently it is adding the height of the tab. How can I make the content of the tab occupy the available space without generating the vertical scroll?
I am using ng-bootstrap
, if you are not familiar with angular don't worry, in this live code you should only see the styles.css
file and /app/app.component.html
: https://stackblitz.com/edit/angular-ng-bootstrap-9obrp7?file=app%2Fapp.component.html
Note: I can fix this with an overflow
, but I want to know why I am getting this problem?
Additional note: ngb-tabset
adds 2 elements with class .tab-content
and .tab-pane
, I set them 100% height
, otherwise the tab content would not grow.
This is my code:
<ngb-tabset [destroyOnHide]="false">
<ngb-tab id="nav-tabContent" class="h-100 border1" title="Relación causa con Emoción">
<ng-template ngbTabContent>
<div class="border2 h-100">holi</div>
</ng-template>
</ngb-tab>
</ngb-tabset>
body,html{
height:100%;
margin:0px;
padding:0px;
}
.h-100{
height:100%;
}
.tab-content {
height:100%;
}
.tab-pane {
height: 100%;
}