I want to design my mini page using only percentage values so it adapts to various resolutions. My problem is that when I use percentage values in "height" and "width" CSS values on all "img" tags, they scale properly but their aspect ratio remains static, resulting in something like this: DEMO
My question is how to make them have 1:1 aspect ratio?
Here's my code:
img {
width: 20%; height:20%;
margin: 2% 2% 2% 2%;
padding: 0 0 0 0;
border: 2px solid #666;
opacity:0.5;
float:left;
}