I am trying to make a header bar on my HTML page that has a h1 and h2 element but then I want an image to appear to the right of both of them. What ever i try the image appears below the other two, i have tried display:inline-block; but that didn't seem to work.
Any ideas how i do it?
.headerBar {}
.headerBar h1 {
float: left;
width: 400px;
line-height: 0;
}
.headerBar h2 {
width: 400px;
line-height: 1;
}
.headerBar img {
width: 40px;
border-radius: 50px;
}
<div class="headerBar">
<h1>My Name</h1>
<h2>Welcome</h2>
<img src="https://dummyimage.com/300x200/000000/fff" alt="Photo" />
<br>
</div>