Size of the table element does not satisfy the explicit settings.

Hi,

I define a table element (<td></td>) with the explicit values of the
height and width (20x20 px). Than I put an image in this element which
has the same size:
<td rowspan="1" colspan="1" style="width: 20px; height: 20px;">
<img src="img/l_t.php?int_col=e1e1e1" width="20" height="20" alt="" /
></td>

As a result I see that my table element (<td></td>) is not square (as
it is supposed to be). The hight is larger than width so that under
the square image I see some empty space. Why it is happening? Does
anybody have any idea?

The whole XHTML code you can find on:
http://www.showandbeshown.com/headtail.php

Pleas help me if you can!
showandbeshown [ Do, 06 Dezember 2007 02:41 ] [ ID #1887601 ]

Re: Size of the table element does not satisfy the explicit settings.

showandbeshown [at] gmail.com wrote:
> Hi,
>
> I define a table element (<td></td>) with the explicit values of the
> height and width (20x20 px). Than I put an image in this element which
> has the same size:
> <td rowspan="1" colspan="1" style="width: 20px; height: 20px;">
> <img src="img/l_t.php?int_col=e1e1e1" width="20" height="20" alt="" /
>> </td>
>
> As a result I see that my table element (<td></td>) is not square (as
> it is supposed to be). The hight is larger than width so that under
> the square image I see some empty space. Why it is happening? Does
> anybody have any idea?
>
> The whole XHTML code you can find on:
> http://www.showandbeshown.com/headtail.php

Add

td img { display: block; }

to your stylesheet should fix your problem... images are inline by
default...


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
lws4art [ Do, 06 Dezember 2007 02:56 ] [ ID #1887602 ]

Re: Size of the table element does not satisfy the explicit settings.

>
> Add
>
> td img { display: block; }
>
> to your stylesheet should fix your problem... images are inline by
> default...
>
Grate! It helps! Thanks a lot!
showandbeshown [ Do, 06 Dezember 2007 03:09 ] [ ID #1887603 ]
Miscellaneous » alt.html » Size of the table element does not satisfy the explicit settings.

Vorheriges Thema: Image in a table in XHTML.
Nächstes Thema: Can I do this in Frontpage?