I have a simple table
with 1 TD
with vertical-align:middle;
. This TD
contains an Image
:
DEMO
just add this class:
td *{
vertical-align:middle
}
question is why when you add a pic to the td
text goes bottom of pic and not any more middle of td.
this is my answer:
when you set td
vertical-align
to middle
it should not set all content vertical-align
to middle
, they are still baseline
. and when you add a pic to the text, the line height rise to the height of image and text is bottom of this height, so you need to set vertical-align
to middle
for fix this problem.
here you can see what i said: DEMO
and sorry about my bad english