ddensley — 2004-04-21T22:24:48-04:00 — #1
I am trying to redesign a site with xhtml, but am getting a whitespace of about 2px at the bottom on my table cells. This happens ONLY in Mozilla. Does anyone know why?
Here is the page:
rcmarotz — 2004-05-17T01:20:13-04:00 — #2
I had the same problem and found the solution on google groups.
Check out this link for the long answer:
In short, use this in your stylesheet (or create a seperate class to handle the specific situation that is causing your problem):
paulob — 2004-05-17T07:40:31-04:00 — #3
Should have looked on sitepoint first as I've answered this question hundreds of times in the css forum
Hmm that article doesn't seem to adress the correct reason (unless I missed it when I read quickly through it ).
Images are treated the same as text by some browsers (and depending on doctype mode etc). What this means is that an image will sit on the baseline (not the bottom) exactly the same as text does and will allow room underneath for descenders in the text.
Setting the image to display block will solve the problem or setting the image to vertical-align:bottom if other content is n the cell and display:block can't be used.
Hope that helps.
webarnes — 2004-05-21T22:30:46-04:00 — #4
This page has always helped me understand the mysterious gaps: