I am trying to have an image and a h1 element on the same line. I have looked this up and tried to use display:inline; for both the parent div element as well as both of the elements.
This is what I have so far
<div style="display:inline;">
<a class="blur" href="#"><img style="margin-top:6px;display:inline;margin-left:1320px;" src="images/gmail.png"></a>
<h1 style="margin-top:6px;display:inline;margin-left:1220px;font-size:20px;color:white;font-style:italic;">Mail Us</h1>
</div>
This displays the image on the line I want, but the h1 element under it.
What I want to accomplish is both of these elements on the same line.
margin-leftof 1320px, I assume there's not going to be much room left for the H1 tag next to it. Without really knowing what you're trying to do, I think you may be better off usingfloat: right. Float articledisplay: inlinestyle to the <a> tag not the <img> tagwhite-space: nowrapto the maindiv. But doing so will put yourh1tag 1220px to the right of theimg, which may not be what you're going for.