Title (and content) of the article I stole from this web site.
From that same web site copy / paste of the key sentence:
HTML layout traditionally was not designed to specify vertical behavior
To have properly working vertical alignment, in my case, I had to introduce a table, this is my HTML:
<div style="height: 800px" class="detail-control"> <table style="height:100%"> <tbody> <tr> <td> <img style="vertical-align: middle" border="0" alt="Please press the play button." onerror="this.src='path to image to be displayed if original one is not found'" src="/URL of an image"> </td> </tr> </tbody> </table> </div>
Notice height of div (800px for the sake of testing), and height of table (100% to cover whole div), then in img tag note style.