I am using Angular material table and I want to set border inside the table, Using CSS I was able to set border: Normal case [
Approach-2:
Eventually, I figured out the solution, since material uses flex-layout we can use
CSS
align-self: stretch; /* Stretch 'auto'-sized items to fit the container */
Result with align-self: stretch
Here is the updated CSS
`.example-container {
display: flex;
flex-direction: column;
flex-basis: 300px;
}
.mat-table {
overflow: auto;
max-height: 500px;
}
.mat-column-name{
border-right: 1px solid grey;
align-self: stretch;
text-align: center
}
.mat-column-position{
border-right: 1px solid grey;
align-self: stretch;
text-align: center;
}
.mat-column-weight{
border-right: 1px solid grey;
align-self: stretch;
text-align: center;
}
.mat-column-symbol{
text-align: center;
align-self: stretch;
}
.mat-column-weight{
align-self: stretch;
} `