jqGrid: how to change cell padding

前端 未结 6 1638
梦谈多话
梦谈多话 2021-02-09 08:31

I\'m using jqGrid3.6.5 on google hosted jQueryUI1.8.2 and jQuery1.4.2

I want to change the cell padding of a jqGrid. For testing purposes I want to set it to 10px all ar

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-09 08:59

    I solved a similar case by wrapping the content in each cell with a div which I in turn padded. It will give you a correct behavior since the column with stays fixed to your jqgrid configuration.

    $("tr.jqgrow td").each(function(){
      $(this).wrapInner("
    ") })

    And styled the div.cell like this (.sass).

    table td .cell
      padding-left: 8px
      padding-right: 8px
    

提交回复
热议问题