tags:

views:

104

answers:

2

Hi, i have an icon image and text like the following, the code source of everything is :

<img src="...." align="absmiddle" /> My Title Here

The problem is that the icon is not aligned vertically with the title in chrome better than firefox.

alt text

I think the absmiddle doesn't work at all ! is there any solution, i don't want to use a table with 2 columns to fix this issue.

Thanks

A: 

vertical-align: middle; may be what you're looking for. I wouldn't necessarily assume WebKit knows from "absmiddle".

Anonymous
Thanks for answer, but it's the same
David
That only works when the element has `display: table-cell`
alex
Note that you may have to set it on a containing element, and alex is probably right (which may not adversely affect the layout).
Anonymous
A: 

The align attribute of has been deprecated and is not supported in HTML 4.01 Strict or XHTML 1.0 Strict.

You should use CSS to achieve this effect. You could try the following code:

<img src="...." align="absmiddle" style="vertical-align:middle;" /> My Title Here

or

<img src="...." align="absmiddle" style="vertical-align:50%;" /> My Title Here
Samuel Mikel Bowles