Although the code provided functions as intended, I am seeking a way for the image to remain in the absolute center without stretching based on the top left corner. Please refer to the images below:
html
<div class="full-img-container">
<img src="/images/crowd.jpg" class="full-img">
</div>
css
.full-img-container {
max-height: 300px;
overflow: hidden;
}
.full-img {
width: 100%;
margin: 0 auto;
vertical-align:middle;
}
When the browser is small:
When the browser is stretched - it stays in 300px but isn't vertically centered (there should be more people in the image)
UPDATE
I was aiming to achieve this effect: