making a table grow horizontally rather than vertically, possiblyusing frames

Discussion in 'HTML' started by Scott, Oct 28, 2009.

  1. Scott

    Scott Guest

    I have a frame-based application that shows two table rows in the
    bottom-most frame of the window. The problem I'm having is that if I
    try to show too much data down there, the table always grows row size
    vertically by using excessive amounts of wrapping. If I try to show
    this page on a small screen, like a laptop, the excessive amount of
    wrapping produces output that is unreadable (table cells that are ten
    lines tall with one word per line).

    What I'd much rather have happen is for the table to grow the rows
    horizontally, adding a horizontal scrollbar as necessary.

    I've tried a couple of approaches to this, the first being to try to
    apply the "max-height" property to <TD> or <TR> via css, but this
    attribute seems to be either outright ignored or unsupported. I also
    tried the following, which seems like it should work, but does
    nothing:

    <style>
    td {
    white-space:nowrap;
    }
    </style>

    Even if I could get nowrap to work, that's suboptimal as I'd really
    like to allow one line of wrapping (each table cell a maximum of two
    lines high).

    Any ideas?

    Scott
     
    Scott, Oct 28, 2009
    #1
    1. Advertising

  2. On Oct 28, 11:56 pm, Scott <> wrote:

    > Any ideas?
    >
    > Scott



    use percent?
     
    Jan C. Faerber, Oct 28, 2009
    #2
    1. Advertising

  3. Scott

    richard Guest

    Re: making a table grow horizontally rather than vertically, possibly using frames

    On Wed, 28 Oct 2009 15:56:00 -0700 (PDT), Scott wrote:

    > I have a frame-based application that shows two table rows in the
    > bottom-most frame of the window. The problem I'm having is that if I
    > try to show too much data down there, the table always grows row size
    > vertically by using excessive amounts of wrapping. If I try to show
    > this page on a small screen, like a laptop, the excessive amount of
    > wrapping produces output that is unreadable (table cells that are ten
    > lines tall with one word per line).
    >
    > What I'd much rather have happen is for the table to grow the rows
    > horizontally, adding a horizontal scrollbar as necessary.
    >
    > I've tried a couple of approaches to this, the first being to try to
    > apply the "max-height" property to <TD> or <TR> via css, but this
    > attribute seems to be either outright ignored or unsupported. I also
    > tried the following, which seems like it should work, but does
    > nothing:
    >
    > <style>
    > td {
    > white-space:nowrap;
    > }
    > </style>
    >
    > Even if I could get nowrap to work, that's suboptimal as I'd really
    > like to allow one line of wrapping (each table cell a maximum of two
    > lines high).
    >
    > Any ideas?
    >
    > Scott


    height:100px;
    width:auto;
    replace 100px with what ever value you need.
     
    richard, Oct 29, 2009
    #3
  4. Scott

    dorayme Guest

    Re: making a table grow horizontally rather than vertically, possibly using frames

    In article
    <>,
    Scott <> wrote:

    > I have a frame-based application that shows two table rows in the
    > bottom-most frame of the window. The problem I'm having is that if I
    > try to show too much data down there, the table always grows row size
    > vertically by using excessive amounts of wrapping. If I try to show
    > this page on a small screen, like a laptop, the excessive amount of
    > wrapping produces output that is unreadable (table cells that are ten
    > lines tall with one word per line).
    >
    > What I'd much rather have happen is for the table to grow the rows
    > horizontally, adding a horizontal scrollbar as necessary.
    >
    > I've tried a couple of approaches to this, the first being to try to
    > apply the "max-height" property to <TD> or <TR> via css, but this
    > attribute seems to be either outright ignored or unsupported. I also
    > tried the following, which seems like it should work, but does
    > nothing:
    >
    > <style>
    > td {
    > white-space:nowrap;
    > }
    > </style>
    >
    > Even if I could get nowrap to work, that's suboptimal as I'd really
    > like to allow one line of wrapping (each table cell a maximum of two
    > lines high).
    >
    > Any ideas?
    >


    You can't control so exactly the number of lines in advance. But you can
    do other things to alleviate the problem. How about trying a few numbers
    to suit you like in:

    td {min-width: 20em;}

    Browser support might be an issue but take a look.

    --
    dorayme
     
    dorayme, Oct 29, 2009
    #4
  5. Scott

    Neredbojias Guest

    Re: making a table grow horizontally rather than vertically, possibly using frames

    On 28 Oct 2009, Scott <> wrote:

    > I have a frame-based application that shows two table rows in the
    > bottom-most frame of the window. The problem I'm having is that if I
    > try to show too much data down there, the table always grows row size
    > vertically by using excessive amounts of wrapping. If I try to show
    > this page on a small screen, like a laptop, the excessive amount of
    > wrapping produces output that is unreadable (table cells that are ten
    > lines tall with one word per line).
    >
    > What I'd much rather have happen is for the table to grow the rows
    > horizontally, adding a horizontal scrollbar as necessary.
    >
    > I've tried a couple of approaches to this, the first being to try to
    > apply the "max-height" property to <TD> or <TR> via css, but this
    > attribute seems to be either outright ignored or unsupported. I also
    > tried the following, which seems like it should work, but does
    > nothing:
    >
    > <style>
    > td {
    > white-space:nowrap;
    > }
    > </style>


    You're either using an archaic browser or you screwed up.
    white-space:nowrap; works fine on a td.

    > Even if I could get nowrap to work, that's suboptimal as I'd really
    > like to allow one line of wrapping (each table cell a maximum of two
    > lines high).


    How would the 1st line know to break and the 2nd not? That might be a
    wee bit difficult to impliment.

    --
    Neredbojias
    http://www.neredbojias.org/
    http://www.neredbojias.net/
     
    Neredbojias, Oct 29, 2009
    #5
  6. Jan C. Faerber, Oct 29, 2009
    #6
    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. Lenny
    Replies:
    1
    Views:
    457
    Andy Holmes
    Oct 16, 2003
  2. Replies:
    5
    Views:
    772
    loga123
    Jun 16, 2006
  3. Thom Little

    Center Table Horizontally

    Thom Little, Jul 19, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    139
    Thom Little
    Jul 19, 2004
  4. Jon Hope
    Replies:
    1
    Views:
    97
    Phlip
    Feb 23, 2009
  5. Stewart
    Replies:
    7
    Views:
    133
    Stewart
    Aug 25, 2005
Loading...

Share This Page