PDA

View Full Version : Changing the text dynamically


vish2603
04-26-04, 02:00 AM
Hi,

I have a button (say Submit button). This button has a background image (using CSS). We are going to localize site. Therefore the text(value) on the button is changing dynamically. If the changed text lenght on the button is less than background image then there is no problem.

But if the text lenght after localization is get bigger than background image of the button then the text does not fit on the image (or the image does not stretch respect to the text leght).

I wants solution for changing the size of backgroud image of button with respect to the dynamically changing text on the button.

Please give me solution if possible, Thanks

pompei
04-29-04, 09:00 PM
You mean, you want your background to stretch? For instance, if you have a background image that has a native resolution of 32pixels wide, you would want to spread that background image over the submit button (e.g. for 64 pixels each second pixel would be identical and it would appear blocky)?

I don't think you can do the above in css, though you could make the background a repeating pattern so that it fills up the submit button.