My goal is to center an image which is bigger in a my div. I do not want to resize the image. The center of the image must be displayed.
My div is defined like:
div.thumbnail
{
display: block;
margin: auto;
height: 100px;
width: 100px;
overflow: hidden;
}
And then my idea was to create this additionally for the image:
div.thumbnail img
{
overflow: hidden;
margin: auto;
}
The HTML looks like:
<div class="thumbnail">
<a href="{{ url_for('showphotos') }}?key={{ album['AlbumName'] }}">
<img src="{{ url_for ('static', filename=album['ThumbPath']) }}">
</a>
</div>
But this does not work for me. Any advice how to fix this?
Thanks Darrell.