How to set the width of a table column

Discussion in 'ASP .Net' started by AAaron123, Jun 13, 2009.

  1. AAaron123

    AAaron123 Guest

    I have a table with two columns of cells.

    I like the left column to be no more than 20% of the browser's width.

    I tried setting a left column's cell width to 20%, tried setting a right
    column's cell width to 80%, tried setting both columns (20% and 80%), tried
    using style and width attributes.

    In all cases the browser (IE8 mostly) seems to adjust the left column to the
    data in it and, as I move its right edge to the left, cover the right
    column.

    Do you know a work around?


    Thanks
     
    AAaron123, Jun 13, 2009
    #1
    1. Advertising

  2. AAaron123

    Stan Guest

    On 13 June, 15:12, "AAaron123" <> wrote:
    > I have a table with two columns of cells.
    >
    > I like the left column to be no more than 20% of the browser's width.
    >
    > I tried setting a left column's cell width to 20%, tried setting a right
    > column's  cell width to 80%, tried setting both columns (20% and 80%), tried
    > using style and width attributes.
    >
    > In all cases the browser (IE8 mostly) seems to adjust the left column to the
    > data in it and, as I move its right edge to the left, cover the right
    > column.
    >
    > Do you know a work around?
    >
    > Thanks


    For this to work you have to ensure that the table width is set to
    some absolute value (e.g. e.g. in pixels)

    If you rely on default values the results vary with different browsers
    and is unreliable.
     
    Stan, Jun 13, 2009
    #2
    1. Advertising

  3. AAaron123

    AAaron123 Guest

    "Stan" <> wrote in message
    news:...
    On 13 June, 15:12, "AAaron123" <> wrote:
    > I have a table with two columns of cells.
    >
    > I like the left column to be no more than 20% of the browser's width.
    >
    > I tried setting a left column's cell width to 20%, tried setting a right
    > column's cell width to 80%, tried setting both columns (20% and 80%),
    > tried
    > using style and width attributes.
    >
    > In all cases the browser (IE8 mostly) seems to adjust the left column to
    > the
    > data in it and, as I move its right edge to the left, cover the right
    > column.
    >
    > Do you know a work around?
    >
    > Thanks


    For this to work you have to ensure that the table width is set to
    some absolute value (e.g. e.g. in pixels)

    If you rely on default values the results vary with different browsers
    and is unreliable.


    >>>>>>>>

    Sounds like I can't have what I want.
    I'd like the table to use all the width the browser gives it.
    And the left column to use no more than 20% of that width.

    No way to do that?

    Thanks

    PS Seems I remember years ago that * meant "whatever was left"
     
    AAaron123, Jun 13, 2009
    #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. BASYS
    Replies:
    1
    Views:
    1,297
    Hans Kesting
    Dec 9, 2003
  2. Sean Jorden
    Replies:
    1
    Views:
    600
    laurie
    Aug 19, 2003
  3. Cal
    Replies:
    1
    Views:
    534
    Tim B
    Jan 8, 2007
  4. David Basford
    Replies:
    3
    Views:
    2,430
    BootNic
    Sep 30, 2007
  5. Carl Howarth

    DG Column Width vs Table Column Width

    Carl Howarth, Oct 22, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    267
    Eliyahu Goldin
    Oct 24, 2004
Loading...

Share This Page