When I inserted a mat-card in a mat-table and set the width to 100%, I noticed that when scrolling with overflow-x from left to right, the whole wrapper was not completely filled with the mat-card. Can anyone suggest CSS optimizations for this issue?
Here is my code:
// HTML
<div class="app-table-wrapper">
<table mat-table [dataSource]="dataSource" id="app-table">...</table>
<mat-card class="change-width"></mat-card>
</div>
// CSS
.app-table-wrapper {
position: relative;
background-color: #fbf9f9;
min-width: 200px;
overflow: auto;
padding: 0;
height: 300px;
}
.change-width {
width: 100%;
}
View my work here