I am trying to add an image next to a text inside a header but the image is over the padding.
body {
margin: 0;
padding: 0;
}
header {
width: 95%;
margin: 10px auto;
padding: 20px;
border-radius: 8px;
box-sizing: border-box;
background-color: blue;
}
<body>
<header>
<img src="http://www.symbols.com/gi.php?type=1&id=3005" style="width: 50px; height: 50px">
<h1 style="display: inline-block;">
Hi!
</h1>
</header>
</body>
I need them to be vertically aligned together, and the image to stop being on top of the padding.
This is different than other examples here on stackoverflow because here Im working with paddings.