2010-05-14 14 views
1

我有一个jQuery UI按钮,我把它放在一个jqGrid工具栏中,但按钮的内容是环绕的。我试图通过使用CSS空白属性来阻止包装无济于事。jqGrid jQuery UI按钮环绕在工具栏中

这里发生的事情的快照:

alt text http://www.freeimagehosting.net/uploads/c455ebf64e.png

这里是我试图解决这个问题的两段代码:

$("#t_imageList").css("white-space", "nowrap").html('<button>Add</button>'); 

    $("#t_imageList button").button({ 
     icons: {primary: 'ui-icon-plus'}, 
     text: true 
    }); 

和/或

$("#t_imageList button").css("white-space", "nowrap").button({ 
    icons: {primary: 'ui-icon-plus'}, 
    text: true 
}); 

有人遇到同样的问题吗?如果是这样,你的解决方案是什么?

回答