IE screws up table cell widths when colspan is used

Discussion in 'HTML' started by Glen K, Jul 13, 2004.

  1. Glen K

    Glen K Guest

    If I veiw the following HTML in IE 5 or 6:

    <table>
    <tr> <td colspan="2">
    ________________________CELL1_____________________
    </td></tr>
    <tr><td style="background-color: green;width:100px;">
    CELL2
    </td>
    <td>
    CELL3
    </td></tr>
    </table>

    The columns with CELL2 comes out a lot wider than 100px. As a matter of
    fact, I've tried experimenting with different widths and it looks like
    it's adding the specified width to half the width of the "CELL1" cell.
    It looks OK in Firefox, so is this some kind of bug or am I missing
    something?
    Glen K, Jul 13, 2004
    #1
    1. Advertising

  2. Glen K

    Stephen Guest

    In news:p,
    Glen K <> expounded:
    | If I veiw the following HTML in IE 5 or 6:
    |
    | <table>
    | <tr> <td colspan="2">
    | ________________________CELL1_____________________
    | </td></tr>
    | <tr><td style="background-color: green;width:100px;">
    | CELL2
    | </td>
    | <td>
    | CELL3
    | </td></tr>
    | </table>
    |
    | The columns with CELL2 comes out a lot wider than 100px. As a matter
    | of fact, I've tried experimenting with different widths and it looks
    | like it's adding the specified width to half the width of the "CELL1"
    | cell. It looks OK in Firefox, so is this some kind of bug or am I
    | missing something?

    It does for me, too. I noticed that your content line in HTML is 380px long.
    That is taken to be colspan x 2 apparently. While FF and NS heed the width
    of the td in cell 2, IE does not. Try making your content line 200 px wide
    and make the td width for cell 2 50%. It appears right in all three. I'm
    guessing IE bug.

    <table>
    <tr> <td colspan="2">
    _______________________CELl 1__ (make this 200px)
    </td></tr>
    <tr><td style="background-color: green;width:50%;">
    CELL2
    </td>
    <td>
    CELL3
    </td></tr>
    </table>


    --

    stephen
    Stephen, Jul 13, 2004
    #2
    1. Advertising

  3. Glen K

    rf Guest

    "Glen K" <> wrote in message
    news:p...
    > If I veiw the following HTML in IE 5 or 6:
    >
    > <table>
    > <tr> <td colspan="2">
    > ________________________CELL1_____________________
    > </td></tr>
    > <tr><td style="background-color: green;width:100px;">
    > CELL2
    > </td>
    > <td>
    > CELL3
    > </td></tr>
    > </table>
    >
    > The columns with CELL2 comes out a lot wider than 100px. As a matter of
    > fact, I've tried experimenting with different widths and it looks like
    > it's adding the specified width to half the width of the "CELL1" cell.
    > It looks OK in Firefox, so is this some kind of bug or am I missing
    > something?


    Known bug. IE figures out how much leftover space it has from the colspanned
    cell and apportions that space over the other cells, in addition to your
    width.

    --
    Cheers
    Richard.
    rf, Jul 14, 2004
    #3
  4. Glen K

    Glen K Guest

    On Tue, 13 Jul 2004 23:57:58 +0000, rf wrote:

    >
    > "Glen K" <> wrote in message
    > news:p...
    >> [quoted text muted]

    >
    > Known bug. IE figures out how much leftover space it has from the colspanned
    > cell and apportions that space over the other cells, in addition to your
    > width.


    Is there any work-around for this? I want to create a web page with a
    banner image across the top and a fixed width menu bar on the left and the
    main content on the right. I'd like to avoid using <DIV>'s since it a
    pain to try and get them to look the way you want.
    Glen K, Jul 14, 2004
    #4
  5. Glen K

    PeterMcC Guest

    Glen K wrote in
    <>

    > On Tue, 13 Jul 2004 23:57:58 +0000, rf wrote:
    >
    >>
    >> "Glen K" <> wrote in message
    >> news:p...
    >>> [quoted text muted]

    >>
    >> Known bug. IE figures out how much leftover space it has from the
    >> colspanned cell and apportions that space over the other cells, in
    >> addition to your width.

    >
    > Is there any work-around for this? I want to create a web page with a
    > banner image across the top and a fixed width menu bar on the left
    > and the main content on the right. I'd like to avoid using <DIV>'s
    > since it a pain to try and get them to look the way you want.


    I'm surprised at that but YMMV - I'd suggest a look at:
    http://bluerobot.com/web/layouts/layout1.html
    http://www.benmeadowcroft.com/webdev/template_1_3/template.html

    Both offer what you seem to be wanting.

    --
    PeterMcC
    If you feel that any of the above is incorrect,
    inappropriate or offensive in any way,
    please ignore it and accept my apologies.
    PeterMcC, Jul 14, 2004
    #5
    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. Dot net work
    Replies:
    2
    Views:
    1,570
    Dot Net Work
    May 20, 2004
  2. Logix
    Replies:
    23
    Views:
    11,650
    Isofarro
    Aug 27, 2004
  3. cho.cabot
    Replies:
    3
    Views:
    1,182
    Jonathan N. Little
    Nov 13, 2006
  4. rob merritt

    asp:table equivalent of colspan???

    rob merritt, Apr 17, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    835
    Teemu Keiski
    Apr 18, 2004
  5. manoj
    Replies:
    1
    Views:
    172
    Henry
    Feb 25, 2008
Loading...

Share This Page