简体   繁体   中英

unable to divide mat-table header

might be a very simple question but am unable to figure out..not sure if this a CSS change or something else. I need a divider between my table header similar as below screenshot(highlighted). 在此处输入图像描述

This is what I have got: 在此处输入图像描述

Assuming you have these only headers and you want the border before Grade

mat-header-cell:nth-of-type(2) {
  border-left: 1px solid 
}

Here is an Running Example

You need to add left border to each cell except the first one - and since the alignment will be off, you can add some padding to make it look pretty

relevant CSS :

th.mat-header-cell { border-left: 2px solid red; }
th.mat-header-cell:nth-child(1) { border-left: none;}
th.mat-header-cell, td.mat-cell { padding:5px; }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM