robert_gsfame Posted June 25, 2010 Share Posted June 25, 2010 Assume there are 3 users with different image (JPG) size *400x100 *200x200 *100x400 and i display the image in 130x130 <img src="xx" height=130 width=130> then how can i adjust each images so that fit 130x130 but without being stretched.. i mean if the image is rectangle then it will appear as rectangle but only the size percentage will be adjusted thx Quote Link to comment Share on other sites More sharing options...
haku Posted June 25, 2010 Share Posted June 25, 2010 Ideally you should resize the image. But you can try this: <div class="image_container"> <img src="img1.jpg" /> </div> <div class="image_container"> <img src="img2.jpg" /> </div> <div class="image_container"> <img src="img3.jpg" /> </div> .image_container { width:130px; height:130px; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.