text in table cells not centered as in headers

前端 未结 2 737
盖世英雄少女心
盖世英雄少女心 2021-01-26 16:52

CSS:

.one {
    width: 13%;
}

.two {
    width: 30%;
}

.three {
    width: 30%;
}

HTML:

2条回答
  •  北海茫月
    2021-01-26 17:16

    You can add this to your css:

    td.two, td.three {
      text-align:right;
    }
    

    You need the td prefix cause your th is using the same css class.

    I hope that helps.

提交回复
热议问题