Image Positioning Inside Table Problem (IE only)

Discussion in 'HTML' started by Tomasz J, Jan 2, 2008.

  1. Tomasz J

    Tomasz J Guest

    Hello Developers!

    I am pulling my hairs out. IE adds extra space below an image when I align
    it at the bottom inside a table cell.
    Firefox and Opera render as expected.

    Simple example available at
    http://my-picture-store.com/test/panelboxtest.htm
    Any ideas? cellspacing and cellpadding is already set to zero.

    Thomas
    Tomasz J, Jan 2, 2008
    #1
    1. Advertising

  2. Tomasz J

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Wed, 02 Jan 2008 13:06:31
    GMT Tomasz J scribed:

    > Hello Developers!
    >
    > I am pulling my hairs out. IE adds extra space below an image when I
    > align it at the bottom inside a table cell.
    > Firefox and Opera render as expected.
    >
    > Simple example available at
    > http://my-picture-store.com/test/panelboxtest.htm
    > Any ideas? cellspacing and cellpadding is already set to zero.


    Image is inline and thus being located at the baseline. One favored fix is
    to display it block.

    --
    Neredbojias
    Riches are their own reward.
    Neredbojias, Jan 2, 2008
    #2
    1. Advertising

  3. Tomasz J

    Thomas J Guest

    Thanks!

    But why inly in IE?? I guess it is a rethorical question.

    Tomasz
    Thomas J, Jan 2, 2008
    #3
  4. Tomasz J

    dorayme Guest

    In article <flh5io$9nu$>,
    "Thomas J" <> wrote:

    > Thanks!
    >
    > But why inly in IE?? I guess it is a rethorical question.
    >
    > Tomasz


    You are not explaining your problem properly. How about a real
    example with a real image and some real dimensions rather than
    the less than clear Xs and teensy cols...?

    Please quote what you are referring to before you reply.

    --
    dorayme
    dorayme, Jan 2, 2008
    #4
  5. Tomasz J

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Wed, 02 Jan 2008 23:08:10 GMT
    Thomas J scribed:

    > Thanks!
    >
    > But why inly in IE?? I guess it is a rethorical question.
    >
    > Tomasz


    Um, I really don't know. Couldn't be IE does something standardized where
    the others compensate or ignore it...nah.

    I look at html and css specs like rubber bands. They can be stretched and
    reshaped, have holes, but they're still what holds things together. No
    browser today is perfect or even that close, so flexibility is a required
    quality for the happy pagemaker.

    --
    Neredbojias
    Riches are their own reward.
    Neredbojias, Jan 3, 2008
    #5
  6. Tomasz J

    rf Guest

    "Tomasz J" <> wrote in message
    news:flg2jo$df0$...
    > Hello Developers!
    >
    > I am pulling my hairs out. IE adds extra space below an image when I align
    > it at the bottom inside a table cell.
    > Firefox and Opera render as expected.
    >
    > Simple example available at
    > http://my-picture-store.com/test/panelboxtest.htm
    > Any ideas? cellspacing and cellpadding is already set to zero.


    Time to stop the guesswork :)

    Do it this way:
    <TD style="HEIGHT: 1px"><IMG alt="" src="index_files/x.gif"></TD></TR>
    instead of
    <TD style="HEIGHT: 1px"><IMG alt="" src="index_files/x.gif"> </TD></TR>

    and
    <TD ...><IMG alt="" src="index_files/x.gif"></TD></TR>
    instead of
    <TD ...><IMG alt="" src="index_files/x.gif">
    </TD></TR> ...

    Note the whitespace before the </td> in each case. A space in the first one
    and a newline, tab,tab or space,space in the second one.

    IE incorrectly *uses* that whitespace. Modern browsers correctly ignore it.

    --
    Richard.
    rf, Jan 3, 2008
    #6
  7. Tomasz J

    Thomas J Guest

    Hi Richard,

    Again, my problem was unwanted space below an image aligned to the bottom of
    a table cell.
    See: http://my-picture-store.com/test/PanelBoxTest.htm

    What I need to accomplish was placing more than one image at the very bottom
    of a table cell. I did not specify this initially not knowing that it would
    make a difference.

    Eliminating whitespace between elements inside the table cell (<td>) solved
    the problem!
    - see: http://my-picture-store.com/test/PanelBoxTest1.htm.
    (tested in IE, Firefox, Opera and Safari)

    Thank you for your and others help.

    T
    Thomas J, Jan 6, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sean Jorden
    Replies:
    1
    Views:
    594
    laurie
    Aug 19, 2003
  2. phl
    Replies:
    1
    Views:
    2,524
    Ivanovich
    Sep 20, 2007
  3. Tarscher

    positioning inside a div

    Tarscher, Dec 17, 2007, in forum: HTML
    Replies:
    3
    Views:
    361
    Tarscher
    Dec 18, 2007
  4. ton
    Replies:
    0
    Views:
    355
  5. TnaG
    Replies:
    2
    Views:
    171
    Thomas 'PointedEars' Lahn
    Jul 18, 2004
Loading...

Share This Page