Image Expands The Table Cell
I have an 600x90 picture and I want a table cell with exactly 600x90 dimensions. But I tried overflow:hidden and some other solution on the net, but it still expands the table cell
Solution 1:
images by default have
display:inline
which in most browsers adds 3-5 pixels to it's height.
Try setting the css for the picture like this:
table.myTable td.withImage img { display:block; }
and see if it works.
Solution 2:
I've seen this happen in some browsers where the default image display type is inline, and it sits above some imaginary line. Try adding display:block to your image class.
If this doesn't help, let us know if its a cross-browser problem or just FF/IE/whatever. Also an example could help.
Post a Comment for "Image Expands The Table Cell"