View Full Version : how to show image in the image box without stretching its original size of the image
09-27-2011, 08: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!!!
09-27-2011, 09: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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.