i have a <div>
element containing multiple lines, each starting with an image, followed by text. I want the text to be next to the vertical center of the image, so i put it inside a div a div and set display:inline-block
and vertical-align:middle
, but the text is still at the bottom.
here is my code:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="game.php-Dateien/style.css">
</head>
<body>
<div style="text-align:left; display:inline-block;">
<img style="height:8vw" src="myImage.png"><div style="display:inline-block; vertical-align:middle">Some describing text</div><br>
</div>
</body>
</html>