While I was fiddling with this \'Fancy 3D Button\' example, I found that the width
seemed to be hard-coded to fit the text\'s width.
Here is the HTML /
Remove the width and display: block
and then add display: inline-block
to the button. To have it remain centered you can either add text-align: center;
on the body
or do the same on a newly created container.
The advantage of this approach (as opossed to centering with auto margins) is that the button will remain centered regardless of how much text it has.
Example: http://cssdeck.com/labs/2u4kf6dv