I'm building a responsive site using WordPress, and images are automatically set to height:100%; width:auto;
and the div resizes according to window size. But this often means some images have their height set to higher than their actual height causing pixelation. What i need is something like height: 100%; width:auto; max-height:"image height here"
. How, if this is possible, is this possible?
The page where this is an issue is here: http://wheretoimmigrate.com/onthemouse/?portfolio=atomic-clothings-2012-campaign
Asked
Active
Viewed 391 times
1

Atom Vayalinkal
- 2,642
- 7
- 29
- 37
-
[Something like this?](http://stackoverflow.com/questions/6282968/vertical-centering-variable-height-image-while-maintaining-max-width-height/6284195#6284195) – 0b10011 Jul 26 '12 at 01:46
-
nope, that doesn't work, but the second answer might be useful for me to set the enclosing divs height, hmm thanks i'll try to see if i can make that work... – Atom Vayalinkal Jul 26 '12 at 02:05
1 Answers
0
I resolved it by simply making the images larger by adding a transparent background of larger size and different proportions. Tricked the system into treating it like a larger image. Worked perfectly.

Atom Vayalinkal
- 2,642
- 7
- 29
- 37