Solution 1 :

You can still use th:nth-child(n) n will be the number of column like following

th:nth-child(1){
    width: 45px;
    max-width: 50px;
}
th:nth-child(2){
    width: 50px;
    max-width: 50px;
}
th:nth-child(3){
    width: 20px;
    max-width: 50px;
}

Problem :

I’m using Angular2 and generic-table as below:

<generic-table
  #notesTable
  [gtClasses]="'table-sm table-hover table-responsive table-bordered'"
  [gtSettings]="configObject.settings"
  [gtFields]="configObject.fields"
  [(gtData)]="configObject.data"
  [gtOptions]="{csvDelimiter: ',', reportColumnWidth: true, numberOfRows: 30}">
</generic-table>

<td class="timestamp-column timestamp" ng-reflect-ng-class="timestamp-column    timestamp">

.timestamp, .timestamp-column {
    width: 45px;
    max-width: 50px;
}

How does one specify the column-width for each column?

Inspecting elements of the page each column has its own class name-column, etc., but when setting CSS attributes for this .name-column {} does nothing.

What am I missing?

Comments

Comment posted by hjalmers.github.io/angular-generic-table/styling

I would suggest you to read the docs of generic-table:

By