I want to prevent a nested img inside a div to be resized. This is the CSS I’m using:
<div id="profile-gallery-image">
<img src="..." />
</div
#profile-gallery-image {
border: 2px solid rgba(223,223,223,1);
width: 100px;
height: 100px;
overflow: hidden;
display: inline-block;
}
and the result I get is this:

The real image is larger then the 100×100 box. So whatever that’s outside it should be hidden.
Try using the background-size attribute to lock the image size.