Is it possible to use CSS to ensure that an image is 100% the width of a fluid div without distorting the square shape? The goal is to match the height to the width for a cohesive look. Currently, I am using the following code for fluid width:
.img{
max-width: 100%;
width: 100%;
min-width: 400px;
}
While this successfully sets the width in most major browsers, I'm struggling to figure out how to match the height to the width. Any suggestions would be appreciated!