valign image in table cell?

Discussion in 'HTML' started by harry, May 5, 2004.

  1. harry

    harry Guest

    Using IE 5.5 (sp2)

    I have an image 21 pixels in height that I want next to a text field (which
    sizes to 22px) with a table cell.

    I'm trying to get the image to centre vertically in the cell but whatever I
    try it makes no difference, the image is stuck in the top left corner of the
    cell making it look odd as the text field is several pixels lower down.

    I've tried putting it in separate cell, using div's but still no difference!

    Is this possible?

    thanks

    harry
    harry, May 5, 2004
    #1
    1. Advertising

  2. harry

    Els Guest

    harry wrote:

    > Using IE 5.5 (sp2)
    >
    > I have an image 21 pixels in height that I want next to a text field (which
    > sizes to 22px) with a table cell.
    >
    > I'm trying to get the image to centre vertically in the cell but whatever I
    > try it makes no difference, the image is stuck in the top left corner of the
    > cell making it look odd as the text field is several pixels lower down.
    >
    > I've tried putting it in separate cell, using div's but still no difference!


    I think posting a url would help a lot, as a table cell
    already centers the content vertically by default...

    --
    Els
    http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Els, May 5, 2004
    #2
    1. Advertising

  3. harry

    Hywel Guest

    In article <9U4mc.2326$>, harry
    says...
    > Using IE 5.5 (sp2)
    >
    > I have an image 21 pixels in height that I want next to a text field (which
    > sizes to 22px) with a table cell.
    >
    > I'm trying to get the image to centre vertically in the cell but whatever I
    > try it makes no difference, the image is stuck in the top left corner of the
    > cell making it look odd as the text field is several pixels lower down.
    >
    > I've tried putting it in separate cell, using div's but still no difference!
    >
    > Is this possible?


    No. To valign a 21 pixel high image you'll need a text field that's 23
    pixels high. With a 21px high field you'll either hat the image aligned
    to the top with 1 pixel and the bottom, or aligned at the bottom with 1
    pixel at the top. You need an even number of pixels difference between
    the height of two objects.

    A URL would be useful.


    --
    Hywel I do not eat quiche
    http://kibo.org.uk/
    http://kibo.org.uk/mfaq.php
    Hywel, May 5, 2004
    #3
    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. Cezar

    valign in DataGrid Column

    Cezar, Dec 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    965
    g pavlov
    Dec 3, 2003
  2. =?Utf-8?B?QXJuZQ==?=

    valign=top doesn't always work

    =?Utf-8?B?QXJuZQ==?=, Dec 6, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    419
    =?Utf-8?B?QXJuZQ==?=
    Dec 6, 2004
  3. Phillip Roncoroni
    Replies:
    14
    Views:
    1,086
    Toby A Inkster
    Apr 5, 2004
  4. Poddys
    Replies:
    5
    Views:
    1,843
    Poddys
    Oct 25, 2006
  5. legacy

    valign text and image

    legacy, Mar 26, 2008, in forum: HTML and CSS
    Replies:
    0
    Views:
    469
    legacy
    Mar 26, 2008
Loading...

Share This Page