I am new to HTML.
I am using the button style is css as given below
.button_style_enabled {
background : url("images/button_down.png") ;
color : #FFFFFF;
height : 21px;
line-height : 21px;
text-align : center;
width : 112px;
border : 0px;
}
How do I adjust my button size based on the text?
Thanks.
Use
paddinginstead ofwidthto set your input styles. This way you can still set the “thickness” of the control, without constraining it to a fixed width.Regarding a
background-imagebeing cut off short, you can add a min-width to fix this:http://jsfiddle.net/kBxz2/1/