TABLE height CSS workaround

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

    TABLE height CSS workaround

    I want a table to be 100% as high as the viewable area of the page.
    Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
    work around using STYLE="height:1 00%" and <BODY STYLE="height:1 00%">.
    It works great in IE but in Netscape it takes height=100% too
    literally and if the page is the slightest bit taller it just cuts it
    off and doesn't expand like IE does. Does anyone know of a workaround
    for this?

    Thank you,
    Angelus
  • EightNineThree

    #2
    Re: TABLE height CSS workaround


    "Angelus" <Angelus@aXpi.n et> wrote in message
    news:46430fe0.0 307312204.72b16 b72@posting.goo gle.com...[color=blue]
    > I want a table to be 100% as high as the viewable area of the page.
    > Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
    > work around using STYLE="height:1 00%" and <BODY STYLE="height:1 00%">.
    > It works great in IE but in Netscape it takes height=100% too
    > literally and if the page is the slightest bit taller it just cuts it
    > off and doesn't expand like IE does. Does anyone know of a workaround
    > for this?
    >[/color]

    With a proper DTD and valid markup there is no way to do what you want.


    --
    Karl Core

    Charles Sweeney says my sig is fine as it is.


    Comment

    • EightNineThree

      #3
      Re: TABLE height CSS workaround


      "alex" <aleks79@yahoo. com> wrote in message
      news:4c488477.0 308011351.55f42 b20@posting.goo gle.com...[color=blue]
      > "EightNineThree " <eightninethree @REMOVEeightnin ethree.com> wrote in[/color]
      message news:<bgdgbd$mc 9$1@ngspool-d02.news.aol.co m>...[color=blue][color=green]
      > > "Angelus" <Angelus@aXpi.n et> wrote in message
      > > news:46430fe0.0 307312204.72b16 b72@posting.goo gle.com...[color=darkred]
      > > > I want a table to be 100% as high as the viewable area of the page.
      > > > Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
      > > > work around using STYLE="height:1 00%" and <BODY STYLE="height:1 00%">.
      > > > It works great in IE but in Netscape it takes height=100% too
      > > > literally and if the page is the slightest bit taller it just cuts it
      > > > off and doesn't expand like IE does. Does anyone know of a workaround
      > > > for this?
      > > >[/color]
      > >
      > > With a proper DTD and valid markup there is no way to do what you want.[/color]
      >
      > What do you mean? If the current specifications don't allow that they
      > have taken a step backwards in my opionion. It is common to have a
      > need for a table to populate the whole width and height on the
      > browser. In fact it is so common that i need to do that too and i
      > can't figure out how. I just posted a question few minutes ago before
      > i read this thread. I need to comply with HTML 4.01 transitional, and
      > even style="height:1 00%" for table doesn't work.
      > Why allow percentages for width but not for height? Doesn't make sense
      > to me.[/color]

      Because tables are intended for tabular data and as such, their size will be
      dictated by the content in the table's cells.


      --
      Karl Core

      Charles Sweeney says my sig is fine as it is.


      Comment

      • alex

        #4
        Re: TABLE height CSS workaround

        > Because tables are intended for tabular data and as such, their size will be[color=blue]
        > dictated by the content in the table's cells.[/color]

        Ok, I guess I can understand that. But they are also widely used to
        arrange things on the page. That might not be their intended use but
        it was something that you could count on to work pretty much the same
        across different browsers.

        For example, if I need to create a page that needs to have header
        always at the top and footer always at the bottom of browser's client
        area, you could create a table with 100% width and height, have three
        rows, and set the height of the middle row to 100%. That way no matter
        how short the content in the middle is the footer will always be at
        the bottom of the page.

        How can I achieve the same effect with the new standard and also
        ensure that it displays correctly with new and old browsers?

        Alex

        Comment

        • alex

          #5
          Re: TABLE height CSS workaround


          "Darin McGrew" <mcgrew@stanfor dalumni.org> wrote in message
          news:bgf52f$gso $1@blue.rahul.n et...[color=blue]
          >
          > Maybe. Maybe not. I regularly use a couple browsing environments where it
          > wouldn't. I can think of several more, including some where the concept of
          > "the bottom of the page" doesn't make sense the way you use it.
          >[/color]
          Sure.[color=blue]
          >
          > There are several CSS-based examples of this kind of thing, including the
          > one at http://css.nu/exp/nf-illustration.html
          >[/color]
          That was interesting. However it didn't display nicely in IE. Accorning to
          my webstats 95% of my visitors use IE... so I have to make sure it works the
          best for IE.
          [color=blue]
          > No, it won't display the same in new and old browsers. But that's how the
          > web works: http://westciv.com/style_master/hous...oil/not_paper/[/color]
          I enjoyed reading this paper. I agree with the author. I am ok with people
          choosing font, size, color, etc.
          But positions of the menus, that's something that should positioned at the
          same place across browsers in my opinion at least. Thanks for the link!
          [color=blue]
          > "What is the use of running when you are not on the right road?"[/color]
          Excercise, maybe? :)


          Comment

          • Stephen Poley

            #6
            Re: TABLE height CSS workaround

            On 1 Aug 2003 14:51:52 -0700, aleks79@yahoo.c om (alex) wrote:
            [color=blue]
            >"EightNineThre e" <eightninethree @REMOVEeightnin ethree.com> wrote in message news:<bgdgbd$mc 9$1@ngspool-d02.news.aol.co m>...[color=green]
            >> "Angelus" <Angelus@aXpi.n et> wrote in message
            >> news:46430fe0.0 307312204.72b16 b72@posting.goo gle.com...[color=darkred]
            >> > I want a table to be 100% as high as the viewable area of the page.
            >> > Well, of course, TABLE HEIGHT is no longer an attribute, so I did a
            >> > work around using STYLE="height:1 00%" and <BODY STYLE="height:1 00%">.
            >> > It works great in IE but in Netscape it takes height=100% too
            >> > literally and if the page is the slightest bit taller it just cuts it
            >> > off and doesn't expand like IE does. Does anyone know of a workaround
            >> > for this?[/color]
            >>
            >> With a proper DTD and valid markup there is no way to do what you want.[/color][/color]
            [color=blue]
            >What do you mean? If the current specifications don't allow that they
            >have taken a step backwards in my opionion. It is common to have a
            >need for a table to populate the whole width and height on the
            >browser.[/color]

            What actually is the need? If someone has a very large window,
            displaying a table with rather little content, why is it necessary for
            the table to fill the window? The page background will fill the window
            anyway, so if you choose an appropriate background, what is the problem?

            --
            Stephen Poley


            Comment

            • alex

              #7
              Re: TABLE height CSS workaround

              Stephen Poley <sbpoley@xs4all .nl> wrote in message news:<kjsmivoau 0qucmv3p4hobc0s 49mr6u13k0@4ax. com>...
              [color=blue]
              >
              > What actually is the need? If someone has a very large window,
              > displaying a table with rather little content, why is it necessary for
              > the table to fill the window? The page background will fill the window
              > anyway, so if you choose an appropriate background, what is the problem?[/color]

              Here is one, and it assumes using tables for doing layout (I know
              that's going to offend some people. I apologize.)

              Links for copy right, privacy policy, site map, credits, etc. are
              usually placed on the bottom of the page. For pages that have enough
              content to fill the whole browser window that's not a problem. But for
              pages that only have a paragraph or so, then the bottom links would
              display at the middle of the browser window. So then as the user goes
              from one page to another, the bottom links keep moving from the bottom
              to middle of the page, without any consistency. Not good.

              Alex

              Comment

              • Stephen Poley

                #8
                Re: TABLE height CSS workaround

                On 4 Aug 2003 06:29:19 -0700, aleks79@yahoo.c om (alex) wrote:
                [color=blue]
                >Stephen Poley <sbpoley@xs4all .nl> wrote in message news:<kjsmivoau 0qucmv3p4hobc0s 49mr6u13k0@4ax. com>...
                >[color=green]
                >> What actually is the need? If someone has a very large window,
                >> displaying a table with rather little content, why is it necessary for
                >> the table to fill the window? The page background will fill the window
                >> anyway, so if you choose an appropriate background, what is the problem?[/color][/color]
                [color=blue]
                >Here is one, and it assumes using tables for doing layout (I know
                >that's going to offend some people. I apologize.)
                >
                >Links for copy right, privacy policy, site map, credits, etc. are
                >usually placed on the bottom of the page. For pages that have enough
                >content to fill the whole browser window that's not a problem. But for
                >pages that only have a paragraph or so, then the bottom links would
                >display at the middle of the browser window. So then as the user goes
                >from one page to another, the bottom links keep moving from the bottom
                >to middle of the page, without any consistency. Not good.[/color]

                Well, OK. A few thoughts:

                - Having the bottom links appear at the bottom of the text each time
                *is* consistent. It's just consistent in a different way to what you
                currently have in mind.

                - If you feel it important to have, say, a 'next' link at the same
                position on the screen each time, so the reader can click through the
                pages rapidly, then your method doesn't work either - if the text
                doesn't all fit on the screen, the link will not initially be visible.
                Best in this case is to use <LINK REL=... > or as second best, place the
                links at the top of the page.

                - But for links such as copyright etc, it's hard to see a need to keep
                them at a specific screen location. The reader will probably click them
                once at most.

                - Having a lot of pages with only a paragraph or two suggests that the
                site design isn't ideal to begin with. I know preferences differ
                somewhat on this point, but I don't like sites with myriad tiny pages
                (nor, in most cases, those with a handful of gigantic pages - it's a
                question of striking a balance.)

                --
                Stephen Poley


                Comment

                Working...