Forum Moderators: open

Message Too Old, No Replies

IE cell height

Why won't IE let me have a cell height of 8 px?

         

justpretty

1:38 am on Dec 13, 2003 (gmt 0)



Hello, this is the stupidest question ever. I've placed an image - 142px wide by 8 px high - in a cell. There are no other cells that would cause this cell to expand. I've tried using CSS to change font size and line height, but nothing is working.

Got any ideas?

daosmith

10:29 am on Dec 13, 2003 (gmt 0)

10+ Year Member



Hi justpretty,

I'm assuming that you when you say cell, you mean a table cell. If so, you should explicitly set the table's cellspacing and cellpadding properties to 0. I'm pretty sure the default value for at least one of these is non-zero.

Hope this helps :)

divaone

12:43 pm on Dec 13, 2003 (gmt 0)

10+ Year Member



to expand on the above a bit, set them to zero and set a class for the table for further options:

<table border="0" cellspacing="0" cellpadding="0" class=mytable>

be sure to specify the height of the table cell.. td height="8", and the height and width of the image.

in your styles add:

table.mytable td {padding:5px;} (or whatever you want)

hth

IeuanJ

3:59 pm on Dec 17, 2003 (gmt 0)

10+ Year Member



Hi there, I have actually had this problem before, even after changing the cellpadding, spacing, height and width there was still a space at the bottom. I ended up making the image a background image of the cell instead and putting &nbsp; in the cell, at this point the cell shrunk to fit the picture perfetly. It worked all alond in netscape :).

Anyway if the image is the only thing in your cell you could try that.

choster

6:14 pm on Dec 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Carriage returns sometimes introduce unwanted whitespace in tables. Instead of

<td>
<img src="" />
</td>

try

<td><img src="" /></td>