I have the following HTML
and my objective is to show the image and the text in the same line, vertically and horizontally aligned. Here is the CSS
I used:
* {
background-color: #1B262C;
margin: 0px;
padding: 0px;
}
.logo {
border: 3px solid green;
text-align: center;
}
.logo-img {
display: inline-block;
border: 3px solid blue;
vertical-align: middle;
}
.logo-text {
display: inline-block;
font-size: 96px;
border: 3px solid blue;
}
<!DOCTYPE html>
<html>
<head>(...)</head>
<body>
<header class="logo">
<img src="logo.png" alt="Sigma logo" class="logo-img">
<h1 class="logo-text">Sigma</h1>
</header>
</body>
</html>
The borders are for visualization only. With these files, the following output is produced:
Please note the strange vertical space that appears above the image. How can I remove it, and effectively align the text and the image?