Answers

Mar 07, 2007 - 04:40 AM
Add 'align' attribute in the image tag, like this:



Mar 07, 2007 - 04:40 AM
Certainly.
Put the CSS style:
vertical-align: middle
on the image element.
The reason they do not look vertically centered is, that the text and the image are two inline elements - meaning that they belong to the same line. The line itself - which is a block element - is in fact centered, because the table cell has valign="center". But to change the alignment between the text and the image internally, you need to specify it using the vertical-align CSS property.
Put the CSS style:
vertical-align: middle
on the image element.
The reason they do not look vertically centered is, that the text and the image are two inline elements - meaning that they belong to the same line. The line itself - which is a block element - is in fact centered, because the table cell has valign="center". But to change the alignment between the text and the image internally, you need to specify it using the vertical-align CSS property.

Mar 07, 2007 - 08:58 AM
Thanks guys.
Add New Comment