jqGrid: how to change cell padding

前端 未结 6 1553
梦谈多话
梦谈多话 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 09:05

    I finally figured out how to set the padding to the jqGrid th and td properly. This is my solution:

    1.Override .ui-jqgrid .ui-jqgrid-htable th div css class

    .ui-jqgrid .ui-jqgrid-htable th div { padding: 10px; }
    

    Do NOT add padding to the the .ui-jqgrid .ui-jqgrid-htable th class.

    2.After you have done the above, you can adding padding to the jqgrid data row.

    .ui-jqgrid tr.jqgrow td{
         height: auto;
         white-space: normal;
         padding: 10px;
    }
    

提交回复
热议问题