Total Pageviews

2011/07/26

Controlling the width/height of the button

Problem
By default, the dimensions of the button is automatically set to the dimensions required to accommodate the content inside, such as an image. But my length of text is larger than the default width of button.
The html is as bellows:

Solution
There will often be times when you want to manually control this dimension to fit your design. By using another CSS declaration, you can. To control the width/height of the button, use the following style declaration:

Therefore, my html will be looked like this way

Demo

No comments: