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

S

showandbeshown

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:

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!
 
J

Jonathan N. Little

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:


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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top