Astronaut
Astronaut

Reputation: 7051

how to bottom align an image to a h1?

I am trying to bottom align an image to a h1 text, but I am not achieving the desired results. I tried adding two divs and align them that did not work well, now I am trying to align a span but I am not getting the desired result as well.

<div id="formheader">
        <div id="formlogo"> <img src="../../Pictures/EditIcon.gif" width="17" height="20" alt="login logo"> </div>
        <div id="formtitle"> <span> <img src="../../Pictures/EditIcon.gif" width="17" height="20" alt="login logo">Editor</span> </div>
      </div>

aligning issue

Any tips on how to align images with text? I had to change from h1 to span because it would not align as h1.

Upvotes: 1

Views: 950

Answers (1)

sandeep
sandeep

Reputation: 92803

Write like this:

img{
 vertical-align:bottom;
}

Upvotes: 1

Related Questions