How to center a JqGrid

前端 未结 2 1982
旧巷少年郎
旧巷少年郎 2021-01-18 01:46
相关标签:
2条回答
  • 2021-01-18 02:07

    Add the following to your CSS:

    .center { width: 640px; margin-left: auto; margin-right: auto; }

    0 讨论(0)
  • 2021-01-18 02:17

    The code of jqgrid has probably changed since the answer of mars 2011. With jqgrid 4.3.1, I had to add the following CSS:

    .center .ui-jqgrid {
        margin-left: auto;
        margin-right: auto;
    }
    

    ".center" finds the table's container, as written in the HTML sample of the question.

    0 讨论(0)
提交回复
热议问题