- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I want to resize the images so they occupy all the 170px and show the most of the image. Is it possible just with css?
Um, width 100%? No?
no, there is the problem if the image with more height that width..
I tried with width:100% and still not working..
You need JavaScript if you want to do that. You want to variably resize the image based on the original dimensions. To do that, I am pretty sure you’ll need the object model that JS provides.
You can’t have it both ways, either they scale to the width or the height.
Simple answer, size your images appropriately before using.
thank you for the answers, I really want to give liberty to my client so I’ll use javascript.
Assuming that they will all be bigger than 170×170 you could put it on the background: http://jsfiddle.net/pzFKD/4/