SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Logan, UT
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Extra space at bottom of table cell??

    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:
    http://milo.usu.edu/biotech/header/index.html

  2. #2
    SitePoint Member
    Join Date
    May 2004
    Location
    MN, USA
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ddensley
    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:
    http://milo.usu.edu/biotech/header/index.html
    I had the same problem and found the solution on google groups.
    Check out this link for the long answer:
    http://www.hut.fi/u/hsivonen/standar...-display-block

    In short, use this in your stylesheet (or create a seperate class to handle the specific situation that is causing your problem):
    img
    {
    display:block;
    border:none;
    padding:0px;
    margin:0px;
    }

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,484
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Quote Originally Posted by rcmarotz
    I had the same problem and found the solution on google groups.
    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.

    Paul

  4. #4
    SitePoint Member webarnes's Avatar
    Join Date
    May 2004
    Location
    Atlanta, Ga. Suburbs
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This page has always helped me understand the mysterious gaps:
    http://devedge.netscape.com/viewsource/2002/img-table/
    William


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •