www.webdeveloper.com
Results 1 to 4 of 4

Thread: Netscape quirks

  1. #1
    Join Date
    Dec 2002
    Location
    Spain
    Posts
    16

    Netscape quirks

    Hi all,

    I have an <img> image inside a <TD> of 25 x 25 pixels

    It works great in IE but in Netscape it insists in making the TD higher leaving a small gap at the bottom, making the TD 25x27.

    Does anyone know why?

    Thanks,

    Fernando

  2. #2
    Join Date
    Nov 2002
    Posts
    984

    Re: Netscape quirks

    Originally posted by Pavon
    [B]Hi all,

    I have an <img> image inside a <TD> of 25 x 25 pixels

    It works great in IE but in Netscape it insists in making the TD higher leaving a small gap at the bottom, making the TD 25x27.

    Does anyone know why?
    Becuse according to the CSS spec default vertical-align for inline/text content is baseline and since <img> is handled the same way as text it also leaves a space below the textline (that is there to provide place for letters like jgpq which reach below the baseline)

    The fix is to reposition you images. The easiest is to include this in all your global or external CSS

    img {vertical-align:bottom;}

    I usually add border:0 too so I won't have to repeat it on all images appearing in linkes.

    img {vertical-align:bottom; border:0;}

    A good default to have in all your CSS files.
    // Stefan Huszics

  3. #3
    Join Date
    Dec 2002
    Location
    Manchester, UK
    Posts
    37
    you can find a detailed discussion of this issue, including several potential solutions, in this article: http://devedge.netscape.com/viewsource/2002/img-table/

  4. #4
    Join Date
    Dec 2002
    Location
    Spain
    Posts
    16
    Thanks Stefan and blufive,

    I think this sounds like it's definatly going to help....I will try it out.

    Thanks!
    Fernando

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles