【问题标题】:How to center align onDemandGrid headers如何居中对齐 onDemandGrid 标题
【发布时间】:2017-08-28 19:34:06
【问题描述】:

我正在使用 dgrid 的 onDemandGrid 并希望居中对齐特定列标题,但不是网格中的所有标题。我将如何实现这一目标?

我的 css 文件中有以下内容:

.mywidget h3 {
  font-size: 1.2em;
}
.mywidget h3, p {
  margin-top: 0;
}

.dgrid {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    font-size:larger;
}
.dgrid-row-odd {
  background: #F2F5F9;
}
.dgrid-column-A{
  width: 80px;
}
.dgrid-column-B{
  width: 120px;
}
.dgrid-column-C {
  width: 80px;
}
.dgrid-column-D {
  width: 120px;
}
.dgrid-column-E {
  width: 50px;
}
.dgrid-column-F {
  width: 70px;
}

【问题讨论】:

    标签: javascript html css dgrid center-align


    【解决方案1】:

    这对我有用

    .dgrid-header .dgrid-column-B {
      width: 120px;
      text-align:center;
    }
    

    【讨论】:

      猜你喜欢
      • 2012-03-28
      • 1970-01-01
      • 2016-10-29
      • 1970-01-01
      • 2018-05-01
      • 2018-04-17
      • 2018-12-30
      • 2015-02-24
      • 2014-11-19
      相关资源
      最近更新 更多