It's only 2px but it's driving me nuts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DuncanIdaho

    It's only 2px but it's driving me nuts

    Hello experts

    IE 7.0.5730.11
    Opera 9.27
    Firefox 2.0.0.14

    This problem only occurs in Opera and Firefox (amazing, IE does
    something right, or maybe not)

    Anyway, the problem is that when I put an image in a <divor a <td>
    both Opera and Firefox always put 2px padding under the image

    I can move the image down by doing this
    style='position :relative; bottom: -2px;'
    But then the gap is at the top.

    If I'm using a table then of course I have cellpadding=0 and cellspacing=0

    I'm sure this never used to be the case, it's driving me nuts
    is it me, or is the world turning differently these days.

    Any ideas how to get rid of this annoying gap

    TIA

    Idaho
  • Ben C

    #2
    Re: It's only 2px but it's driving me nuts

    On 2008-05-01, DuncanIdaho <Duncan.Idaho20 08@googlemail.c omwrote:
    Hello experts
    >
    IE 7.0.5730.11
    Opera 9.27
    Firefox 2.0.0.14
    >
    This problem only occurs in Opera and Firefox (amazing, IE does
    something right, or maybe not)
    Not this time.
    Anyway, the problem is that when I put an image in a <divor a <td>
    both Opera and Firefox always put 2px padding under the image
    >
    I can move the image down by doing this
    style='position :relative; bottom: -2px;'
    Don't fix the symptom.
    But then the gap is at the top.
    >
    If I'm using a table then of course I have cellpadding=0 and cellspacing=0
    >
    I'm sure this never used to be the case, it's driving me nuts
    is it me, or is the world turning differently these days.
    >
    Any ideas how to get rid of this annoying gap
    Set display: block or vertical-align: bottom on the img.

    The gap is supposed to be there because the img is baseline aligned by
    default, so it sits on the baseline like a letter, with a bit of space
    below it for descenders.

    Comment

    • DuncanIdaho

      #3
      Re: It's only 2px but it's driving me nuts

      Ben C wrote:
      On 2008-05-01, DuncanIdaho <Duncan.Idaho20 08@googlemail.c omwrote:
      >Hello experts
      >>
      >IE 7.0.5730.11
      >Opera 9.27
      >Firefox 2.0.0.14
      >>
      >This problem only occurs in Opera and Firefox (amazing, IE does
      >something right, or maybe not)
      >
      Not this time.
      >
      >Anyway, the problem is that when I put an image in a <divor a <td>
      >both Opera and Firefox always put 2px padding under the image
      >>
      ....
      Set display: block or vertical-align: bottom on the img.
      >
      The gap is supposed to be there because the img is baseline aligned by
      default, so it sits on the baseline like a letter, with a bit of space
      below it for descenders.
      OK display:block works, thanks

      Shame, I don't really like dissing IE it's so ... 'yesterday'.
      Thought I'd found something it did right ... ah well, the world still
      turns the same I guess.

      Thanks again

      Idaho

      Comment

      • dorayme

        #4
        Re: It's only 2px but it's driving me nuts

        In article <slrng1k20e.a3. spamspam@bowser .marioworld>,
        Ben C <spamspam@spam. eggswrote:
        On 2008-05-01, DuncanIdaho <Duncan.Idaho20 08@googlemail.c omwrote:
        Hello experts

        IE 7.0.5730.11
        Opera 9.27
        Firefox 2.0.0.14

        This problem only occurs in Opera and Firefox (amazing, IE does
        something right, or maybe not)
        >
        And Safari and more... though it is not really a "problem" as Ben
        indicates, it is what is supposed to happen...
        Not this time.
        >
        Anyway, the problem is that when I put an image in a <divor a <td>
        both Opera and Firefox always put 2px padding under the image

        I can move the image down by doing this
        style='position :relative; bottom: -2px;'
        >
        Don't fix the symptom.
        >
        it's driving me nuts
        Any ideas how to get rid of this annoying gap
        >
        Set display: block or vertical-align: bottom on the img.
        >
        The gap is supposed to be there because the img is baseline aligned by
        default, so it sits on the baseline like a letter, with a bit of space
        below it for descenders.
        Yes. If OP wants text to go on simply on the same line, the vertical
        align route sounds best. But hard to say without a url from the op.

        Anyway, why am I chorusing on here? To supply an illustration:

        <http://tinyurl.com/2x3t8f>

        --
        dorayme

        Comment

        Working...