auto means that you leave it to the browser to calculate height and width for you.
Your CSS works, if you try the following HTML with different numbers, you should see the button changes its size.
<input type="button" class="button1024" value="Click me" />
View source in your browser, see whether the class is actually set for the button. Check whether there are conflict CSS applied on the same button.