resizable table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bootstrap bill

    resizable table

    I want a table like this

    +---------------------------------------------------------+
    | row one
    |
    +---------------------------------------------------------+
    |
    |
    | row two
    |
    |
    |
    +---------------------------------------------------------+
    | row three
    |
    +---------------------------------------------------------+

    Row's one and three will be a fixed height. I want row two to fill up
    whatever is left of the window, and the height should change when the window
    is resized. I would prefer a method that is cross platform. Can I do this
    without code?


    --
    "It's easy enough to be pleasant, when life hums along like a song.
    But the man worth while is the man who can smile when
    everything goes dead wrong.".


  • Mitja

    #2
    Re: resizable table

    Bootstrap bill <wrcousert@yaho o.com>
    (news:x1lCc.619 13$wO4.21242@tw ister.socal.rr. com) wrote:[color=blue]
    > I want a table like this
    >
    > +---------------------------------------------------------+[color=green]
    >> row one
    >>[/color]
    > +---------------------------------------------------------+[color=green]
    >>
    >>
    >> row two
    >>
    >>
    >>[/color]
    > +---------------------------------------------------------+[color=green]
    >> row three
    >>[/color]
    > +---------------------------------------------------------+
    >
    > Row's one and three will be a fixed height. I want row two to fill up
    > whatever is left of the window, and the height should change when the
    > window is resized. I would prefer a method that is cross platform.
    > Can I do this without code?[/color]

    "Wthout code"? Now _that_ will be a tough one ;)

    Use something like
    <style type="text/css">
    html,body,table {height:100%}
    tr.bar {height:5em;}
    </style>
    <table>
    <tr class="bar"><td >foo</td></tr>
    <tr><td>foo</td></tr>
    <tr class="bar"><td >foo</td></tr>
    </table>

    The preferred way to do it is with divs, though:
    <body style="padding: 150px 0">
    <div style="position :absolute;top:0 ;left:0">header </div>
    text foo bar
    <div style="position :absolute;botto m:0;left:0">foo ter</div>
    </body>

    Both untested, but should work.

    If you don't understand what I wrote (HTML&CSS, I mean, not this text), read
    a tutorial on CSS. It's a must. Well... a should :)


    Comment

    • Neal

      #3
      Re: resizable table

      On Wed, 23 Jun 2004 21:51:42 +0200, Mitja <nun@meyl.com > wrote:
      [color=blue]
      > The preferred way to do it is with divs, though:
      > <body style="padding: 150px 0">
      > <div style="position :absolute;top:0 ;left:0">header </div>
      > text foo bar
      > <div style="position :absolute;botto m:0;left:0">foo ter</div>
      > </body>[/color]

      One problem is if the user is on a monitor set for 450px high, the center
      section is awfully small. You could impose scrolling on it.

      Another problem is if the header material is larger than 150px. Resizing
      text can cause this problem.

      I think the design idea is flawed from the start, frankly, but there are
      ways of getting it to work the way the OP wants - unfortunately, all
      result in usability problems and/or an ugly design in some environments.

      Comment

      • Whitecrest

        #4
        Re: resizable table

        In article <opr92c5kxm6v66 56@news.individ ual.net>, neal413@yahoo.c om
        says...[color=blue]
        > I think the design idea is flawed from the start, frankly, but there are
        > ways of getting it to work the way the OP wants - unfortunately, all
        > result in usability problems and/or an ugly design in some environments.[/color]

        But ugly design doesn't matter. It makes no difference what the
        presentation looks like as long as the user can read the content....
        Content and content alone will keep the customer, presentation is
        meaningless...

        Yes, I was being sarcastic, and factious at the same time.

        --
        Whitecrest Entertainment

        Comment

        • Mitja

          #5
          Re: resizable table

          Neal <neal413@yahoo. com>
          (news:opr92c5kx m6v6656@news.in dividual.net) wrote:[color=blue]
          > On Wed, 23 Jun 2004 21:51:42 +0200, Mitja <nun@meyl.com > wrote:
          >[color=green]
          >> The preferred way to do it is with divs, though:
          >> <body style="padding: 150px 0">
          >> <div style="position :absolute;top:0 ;left:0">header </div>
          >> text foo bar
          >> <div style="position :absolute;botto m:0;left:0">foo ter</div>
          >> </body>[/color]
          >
          > One problem is if the user is on a monitor set for 450px high, the
          > center section is awfully small. You could impose scrolling on it.[/color]

          My fault - I should have tested it. It only renders in Opera as intended.
          IE and Firefox put div.header at the bottom of the _viewport_. I've never
          used bottom:0 in practice so I must say I was quite surprised to see this. I
          expected the behavior from the specs, at least from Firefox: "In the
          absolute positioning model, a box is explicitly offset with respect to its
          containing block." But then, if things were done as per spec, you shouldn't
          get the behavior OP wanted when text doesn't fill the viewport.
          What have I overlooked?
          [color=blue]
          > Another problem is if the header material is larger than 150px.
          > Resizing text can cause this problem.[/color]

          Agreed. Should be 5em or something.
          [color=blue]
          > I think the design idea is flawed from the start, frankly, but there
          > are ways of getting it to work the way the OP wants - unfortunately,
          > all result in usability problems and/or an ugly design in some
          > environments.[/color]



          Comment

          • Bootstrap bill

            #6
            Re: resizable table


            "Bootstrap bill" <wrcousert@yaho o.com> wrote in message
            news:x1lCc.6191 3$wO4.21242@twi ster.socal.rr.c om...[color=blue]
            > I want a table like this[/color]

            I'd like to thank everyone for their quick responses. I found a solution to
            my problem and will post the URL to my site in a few days.

            Thanks again!

            -Bill


            Comment

            • Whitecrest

              #7
              Re: resizable table

              In article <UPGCc.43$Fy.1@ twister.socal.r r.com>, wrcousert@yahoo .com
              says...[color=blue]
              > I'd like to thank everyone for their quick responses. I found a solution to
              > my problem and will post the URL to my site in a few days.[/color]

              Oh sure you will.... You come here, and just take, take, take, and give
              nothing. Then just like that you leave. Oh sure, you say you will
              return with a url, but we both know the truth. The minute you leave
              this forum some other fancy forum will catch your eye, and you will
              never be back...

              What about the children? Did you think about them?

              --
              Whitecrest Entertainment

              Comment

              Working...