views:

104

answers:

1

In my HTML pages I have text with imgs. The top edge of the img is aligned with the top of the text, but I want the bottom of the img to be aligned with the text.

How can this be done?

UPDATE Now I see this is the default behaviour, but it doesn't happen in my page. What could possibly be wrong?

+2  A: 

EDIT: I came back to add line breaks and decided to throw an example in, too.

You can do this with CSS's vertical-align property. Something like this:

<img src="wherever.png" style="vertical-align: text-top;" />

More information about the style is available at w3schools, where they have a neat sandbox.

Lord Torgamus