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;
}
精彩评论