a {
display: block;
padding: 0 10px;
/* background: rgba(0,0,0,0.5); */
height: 100%;
border-left: 1px solid rgba(0,0,0,0.1);
text-decoration: none;
color: white;
background-color:rgba(0,0,0,0.5);
height:100px;
}
img {
max-height: 72px;
max-width: 598;
margin: 0;
padding: 0;
vertical-align: middle;
width: 40px;
height: 40px;
border-radius: 50%;
}
.img_frame {
display: inline-block;
vertical-align: middle;
height: 100%;
background-color: black;
}
<a href="">
<span class="img_frame"></span>
<img class="size-40X40 img-round" src="https://yt3.ggpht.com/-zvxnrUIYjg8/AAAAAAAAAAI/AAAAAAAAAAA/vnVVaPAvxOE/s900-c-k-no-mo-rj-c0xffffff/photo.jpg">
</a>
If I remove the span
tag, the image does not align to the center. Even replacing the span with another tag like a p
tag results in the same issue...
I would appreciate an explanation of these properties. Thank you so much in advance!