开发者

Jqgrid loadtext not centered

I customized jqgrid loadtext to a longer string than the default "loading", but can't get the text to center:

loadtext: 'this is my loading text',

the rendered html is:

<div id="xxx" 
     class="loading ui-state-default ui-state-active" 
     style="display: none;">this is my loading text</div>

I can put whatever html into loadtext, however,开发者_如何学运维 it still would not center. is there a way?


What I did was override jqGrid's css like so:

.ui-jqgrid .loading 
{
    background-image: url(jqgrid-loading.gif);
    border-style: none;
    background-repeat: no-repeat;
    background-color:transparent;
    width:100%;
    height:100%;
    margin:0 auto;
    left:0;
    top:0;
}

I used an image but you can do the same thing with text.

The loading image is now centered vertically and horizontally

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜