Kimberly_B
asked on
Can't get image to exact bottom of cell
Hello Experts.
I have a banner image 148 px tall to be displayed in a table cell. I want the image in this cell/row to be vertically adjacent to the pixels of the cell/row beneath it. Both Firefox and Chrome are showing that the inspected cell/row has a height that is being "calculated" at 151px. This leaves an annoying 3px space between rows.
Everything I'm doing with border-collapse=collapse; or HTML cell spacing/padding or alignment is not having any effect.
Advice?
I have a banner image 148 px tall to be displayed in a table cell. I want the image in this cell/row to be vertically adjacent to the pixels of the cell/row beneath it. Both Firefox and Chrome are showing that the inspected cell/row has a height that is being "calculated" at 151px. This leaves an annoying 3px space between rows.
Everything I'm doing with border-collapse=collapse; or HTML cell spacing/padding or alignment is not having any effect.
Advice?
Did you trying settting the Vertical align property of the row beneath the image to "top"?
Table cells will accomodate in order for the sum of all rows add up to the table height.
Maybe there is content missing in subsequent table rows, and this particular row gets taller.
You have to ask yourself these 2 questions:
1. Is cellpadding & cellspacing & border = 0?
2. How is the height of table cells in this row being specified?
Maybe there is content missing in subsequent table rows, and this particular row gets taller.
You have to ask yourself these 2 questions:
1. Is cellpadding & cellspacing & border = 0?
2. How is the height of table cells in this row being specified?
Add vertical-align: bottom; to your image css, and don't assign height to the table's row.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yay!
This worked in my CSS: img { display:block; }
img {display: inline-block; } did not work. Don't know why. FYI.
Thank you! Brilliant solution!
(thank you also to the other responses. None of them worked, but thanks anyway)
This worked in my CSS: img { display:block; }
img {display: inline-block; } did not work. Don't know why. FYI.
Thank you! Brilliant solution!
(thank you also to the other responses. None of them worked, but thanks anyway)