...

View Full Version : how to show image in the image box without stretching its original size of the image



psasikumar
09-27-2011, 07:01 AM
i have image button i need to display image .if the size of the image button is 100*100 and image size is 50*50 .the remaining space of the image button should be empty.the image should not stretch.

can any one guide me i am new to programming

Thanks in advance!!!

ironboy
09-27-2011, 08:19 AM
<button style="width:XXXpx;height:YYpx;background:url(myImg.jpg) no-repeat center center">

Replace XXX with a width in pixels, replace YY with a height in pixels, replace myImg.jpg with the name (and path if in another folder) to your image.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum