开发者

how do i set the size of jquery buttons?

My game is using 开发者_JS百科jquery buttons for the inventory system. The problem is that the buttons are being resized automatically depending on the text in the button, which changes depending on what is in the inventory.

How can I set the size of the buttons? I would also like to set a background image for the buttons depending on the item.

** these are jqueryUI buttons like this:

<button id="invOn1" style="float: left;">Loading...</button>

Thanks.


try this solution :

$("button").button().css('width','350px');


You can put this in your CSS

.ui-button{
    line-height: 0.9em;
    font-size: 0.8em;
    width: 100px;
    height: 30px;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜