Well, I spent a lot of time on this, so I could also try it on my own question. I solve this problem with css3:
@media only screen and (min-width: 959px) { .img { max-width: 50%; max-height: 50%; display: block; margin-left: auto; margin-right: auto; } }
In this case, if the user's physical screen had a width> 959px (I have), it will be css applied to all images. The following HTML illustrates this:
<ul class="slides"> <li> <img src="image/Bastion_Digital_Art_Pack_PNG/Bastion_0_Foreward.png" /> </li> <li> <img src="image/Bastion_Digital_Art_Pack_PNG/Bastion_1_Calamity.png" /> </li> <li> <img src="image/Bastion_Digital_Art_Pack_PNG/Bastion_1_CalamityKid.png" /> </li> <li> <img src="image/Bastion_Digital_Art_Pack_PNG/Bastion_1_ColdWarKid.png" /> </li> <li> <img src="image/Bastion_Digital_Art_Pack_PNG/Bastion_1_KidThinking.png" /> </li> <li> <img src="image/Bastion_Digital_Art_Pack_PNG/Bastion_1_KidVsScumbag.png" /> </li> </ul> </div>
This will result in the resizing of ALL IMAGES (ignoring the difference in size) to 50% of their original size and will only be centered then HORIZONTAL. It turns out to center them vertically and resize them depending on their t
source share