When Material creates the table it automagically applies two class-names for you which you can use to style each column.
In the the example below the styles is named mat-column-userId and cdk-column-userId.
I found a combination of jymdman's and Rahul Patil's answers is working best for me:
.mat-column-userId {
flex: 0 0 75px;
}
Also, if you have one "leading" column which you want to always occupy a certain amount of space across different devices, I found the following quite handy to adopt to the available container width in a more responsive kind (this forces the remaining columns to use the remaining space evenly):
means that this column will use the 30% of the row width by default, when gt-xs @mediaQuery is met, the new width will be 15% and similar behavior for other conditions
If you have too many table column and it is not adjusted in angular table using md-table, then paste the following style in component.css file. It will work like a charm with scroll view horizontally.