Log in

View Full Version : Image size of a button



tvd
05-15-2007, 02:14 PM
Hi,

I have added an image to my button. If I increase the size of the button, the image is visible in tile form. How do I stretch the image of the button.



<input id="zoomOutButton" style="background-image:url(images/ZoomOut.bmp); background-position: center; width: 25px; background-color: transparent;" type="button" onclick="DoZoomOut();" title="Zoom Out"/>

Can anyone please help me figure out, what do I need to change to achive my requirements.
Any help is really appreciated.

Thanks

Bob90
05-20-2007, 09:18 AM
Just add this


repeat-x

to the button style background.

:)

mwinter
05-20-2007, 01:31 PM
I have added [a background] image to my button. If I increase the size of the button, the image is visible in tile form. How do I stretch the image of the button.

You cannot. Background images are either rendered as-is, or tiled. Only foreground images can be resized, and then the browser typically does a bad job through the use of pixel-based resizing methods.



Just add this



repeat-x


Erm, that tiles the background, though only horizontally rather than vertically as well.