Table height in percents

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

    Table height in percents

    Hi,

    It seems like HTML 4.01 Transitional spec. doesn't allow table height
    to be expressed in percents.

    When i have this doctype tag:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    the percents don't work.

    I need to make my HTML to be valid 4.01, how can i make a table
    populate the whole page? In other words how can i get the same effect
    as width="100%" and height="100%"

    Thanks,
    Alex
  • brucie

    #2
    Re: Table height in percents

    In post <4c488477.03080 11341.1e5d609d@ posting.google. com>
    alex said...
    [color=blue]
    > It seems like HTML 4.01 Transitional spec. doesn't allow table height
    > to be expressed in percents.[/color]

    height is not a valid attribute of <table> in any HTML specification
    [color=blue]
    > I need to make my HTML to be valid 4.01, how can i make a table
    > populate the whole page?[/color]

    you shouldn't be using tables for layout. having valid html isn't much
    use if your document is broken from the start.
    [color=blue]
    > In other words how can i get the same effect
    > as width="100%" and height="100%"[/color]

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <title>blah</title>
    <style type="text/css">
    html,body{margi n:0;padding:0;h eight:100%;}
    table{width:100 %;height:100%;b order:1px solid red;}
    </style>
    <table><tr><td> blah</td></tr></table>


    --
    brucie a. blackford. 02/August/2003 07:44:53 am kilo.

    Comment

    • Zac Hester

      #3
      Re: Table height in percents

      "brucie" <brucie01@loser .brucies.com> wrote in message
      news:1wn4pla1rj x4r.dlg@alt-html.org...[color=blue]
      > In post <4c488477.03080 11341.1e5d609d@ posting.google. com>
      > alex said...
      >[color=green]
      > > I need to make my HTML to be valid 4.01, how can i make a table
      > > populate the whole page?[/color]
      >
      > you shouldn't be using tables for layout. having valid html isn't much
      > use if your document is broken from the start.
      >[/color]

      Out of curiosity (and a lack of finding good info on w3.org), what is the
      preferred (standard) method of columnar layout? I never read much about the
      table specifications until now, and I can't seem to find where it says using
      tables for containing other parts of the layout tree is bad. (I'm sure I'm
      not looking quite hard enough.) Do you have a link where I can just start
      reading how to layout columns the "proper" way?

      I use columns all the time for my layouts' navigation. Until I find out
      different, I always use a single-row table to split the page into two or
      three columns. I always thought it was kind of clunky, but it got the job
      done, and I do feel that it's a bit of a violation of a "good" parse tree to
      use a data layout method for page layout.

      I looked up COL and COLGROUP, but they are only relative to a table in
      context.

      Thanks for anyone's advice,
      Zac


      Comment

      • brucie

        #4
        Re: Table height in percents

        In post <3f2af0e2$1@new s.enetis.net>
        Zac Hester said...
        [color=blue][color=green]
        >> you shouldn't be using tables for layout. having valid html isn't much
        >> use if your document is broken from the start.[/color][/color]
        [color=blue]
        > Out of curiosity (and a lack of finding good info on w3.org), what is the
        > preferred (standard) method of columnar layout?[/color]

        CSS
        [color=blue]
        > I never read much about the table specifications until now, and I can't seem
        > to find where it says using tables for containing other parts of the layout
        > tree is bad.[/color]

        <quote>
        Tables should not be used purely as a means to layout document content
        as this may present problems when rendering to non-visual media.
        Additionally, when used with graphics, these tables may force users to
        scroll horizontally to view a table designed on a system with a larger
        display. To minimize these problems, authors should use style sheets
        to control layout rather than tables.
        </quote> http://www.w3.org/TR/html401/struct/tables.html#h-11.1

        also: B.5 Notes on tables

        [color=blue]
        > Do you have a link where I can just start reading how to layout columns the
        > "proper" way?[/color]

        its very easy to achieve column layouts with CSS

        1-3-1 100% available height layout


        2-1-3-1 content of areas dictates height layout. widths are whatever
        you feel like and can be mixed unlike tables:


        but unfortunately IE doesn't support the easiest way to do it so a bit
        of playing around or using a different method is needed to support
        crappy IE. M$ should be shot.

        CSS layout examples:

        A demonstration of what can be accomplished visually through CSS-based design.











        MGS動画で販売される素人モノの作品に出演するAV女優の名前をデータベース化しました。






        --
        brucie a. blackford. 02/August/2003 09:04:48 am kilo.

        Comment

        • Zac Hester

          #5
          Re: Table height in percents

          "brucie" <brucie01@loser .brucies.com> wrote in message
          news:jb65v7ns29 1n$.dlg@alt-html.org...[color=blue]
          >
          > <snip>A whole lot of useful info...</snip>
          >
          > brucie a. blackford. 02/August/2003 09:04:48 am kilo.
          > http://loser.brucies.com/[/color]

          Thanks a ton! This is exactly what I was looking for. It's too bad that we
          have to tip-toe around this M$ crap all the time. I did like the
          closing-bracket bug, though. I have a lot more uses for that little gem.

          Thanks again,
          Zac


          Comment

          • Andrew Fedoniouk

            #6
            One more

            <CITE from="http://www.w3.org/TR/html401/struct/tables.html#h-11.1">

            The HTML table model has been designed so that, with author assistance, user
            agents may render tables incrementally (i.e., as table rows arrive) rather
            than having to wait for all the data before beginning to render.

            </CITE>

            Excellent! <TABLE style="height:1 00%"> How?

            <CITE from="http://www.w3.org/TR/html401/struct/tables.html#h-11.1">

            In order for a user agent to format a table in one pass, authors *MUST* tell
            the user agent:

            a.. The number of columns in the table. Please consult the section on
            calculating the number of columns in a table for details on how to supply
            this information.
            b.. The widths of these columns. Please consult the section on calculating
            the width of columns for details on how to supply this information.
            </CITE>

            Is this valid HTML by the standard?
            <TABLE>
            <TR><TD><TD></TR>
            <TR><TD><TD><TD ><TD></TR>
            ....
            <!--somewhere at the end-->
            <TR><TD><TD><TD ><TD><TD><TD> </TR>
            </TABLE>

            If yes, could anybody explain me what the hell is this *must* mean?

            What renderer should do with the rest?

            Is there somewhere LOGICtidy application? Could you give it to authors?

            And don't blame on browsers, please. They are trying to render this fuzzy
            set.

            Andrew.






            Comment

            • Steve Pugh

              #7
              Re: One more

              "Andrew Fedoniouk" <andrew@terra-informatica.org > wrote:
              [color=blue]
              ><CITE from="http://www.w3.org/TR/html401/struct/tables.html#h-11.1">
              >
              >The HTML table model has been designed so that, with author assistance, user
              >agents may render tables incrementally (i.e., as table rows arrive) rather
              >than having to wait for all the data before beginning to render.
              >
              ></CITE>
              >
              >Excellent! <TABLE style="height:1 00%"> How?[/color]

              Sorry, what's your point? The HTML spec refers to just HTML if you add
              CSS on top of that you may end up putting the browser in the position
              of having to choose whether to follow the HTML or the CSS...
              [color=blue]
              ><CITE from="http://www.w3.org/TR/html401/struct/tables.html#h-11.1">
              >
              >In order for a user agent to format a table in one pass, authors *MUST* tell
              >the user agent:
              >
              > a.. The number of columns in the table. Please consult the section on
              >calculating the number of columns in a table for details on how to supply
              >this information.
              > b.. The widths of these columns. Please consult the section on calculating
              >the width of columns for details on how to supply this information.
              ></CITE>
              >
              >Is this valid HTML by the standard?[/color]
              [color=blue]
              ><TABLE>
              ><TR><TD><TD> </TR>
              ><TR><TD><TD><T D><TD></TR>
              ><TR><TD><TD><T D><TD><TD><TD> </TR>
              ></TABLE>[/color]

              Yes it's valid. But it does not meet the additional criteria that you
              quote above.
              [color=blue]
              >If yes, could anybody explain me what the hell is this *must* mean?[/color]

              Look at the <col> element. That's what tells the browser the number of
              columns. As you haven't included any <col>s then the browser can not
              "format a table in one pass"

              Steve

              --
              "My theories appal you, my heresies outrage you,
              I never answer letters and you don't like my tie." - The Doctor

              Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

              Comment

              • Andrew Fedoniouk

                #8
                Re: One more

                > Look at the <col> element. That's what tells the browser the number of[color=blue]
                > columns. As you haven't included any <col>s then the browser can not
                > "format a table in one pass"[/color]

                <TABLE>
                <COL>
                <TR><TD><TD></TR>
                <TR><TD><TD><TD ><TD></TR>
                <TR><TD><TD><TD ><TD><TD><TD> </TR>
                </TABLE>

                And now it can?

                "In order for a user agent to format a table in one pass, authors *MUST*
                tell
                the user agent...."

                I did. So what?


                Andrew.




                Comment

                • Steve Pugh

                  #9
                  Re: One more

                  "Andrew Fedoniouk" <andrew@terra-informatica.org > wrote:
                  [color=blue][color=green]
                  >> Look at the <col> element. That's what tells the browser the number of
                  >> columns. As you haven't included any <col>s then the browser can not
                  >> "format a table in one pass"[/color]
                  >
                  ><TABLE>
                  ><COL>
                  ><TR><TD><TD> </TR>
                  ><TR><TD><TD><T D><TD></TR>
                  ><TR><TD><TD><T D><TD><TD><TD> </TR>
                  ></TABLE>
                  >
                  >And now it can?
                  >
                  >"In order for a user agent to format a table in one pass, authors *MUST*
                  >tell
                  >the user agent...."
                  >
                  >I did. So what?[/color]

                  So if a browser only displays the first table cell in each row you
                  only have yourself to blame.

                  More likely the browser will realise that you have made an error and
                  will reformat the table, i.e. it will take more than one pass. As you
                  haven't complied with the requirements given you can't expect anything
                  else.

                  Steve

                  --
                  "My theories appal you, my heresies outrage you,
                  I never answer letters and you don't like my tie." - The Doctor

                  Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

                  Comment

                  • Jim Dabell

                    #10
                    Re: Table height in percents

                    Andrew Fedoniouk wrote:
                    [color=blue][color=green]
                    >> <quote>
                    >> Tables should not be used purely as a means to layout document content
                    >> as this may present problems when rendering to non-visual media.[/color]
                    >[color=green]
                    >> To minimize these problems, authors should use style sheets
                    >> to control layout rather than tables.[/color]
                    >
                    > <LI style="margin-left:-100px; position:absolu te:top:-10000px" >Lets full
                    > the Lynx. It will think that I am list item. But I am not! Some wise
                    > author (or might be user) applied some weird CSS style to my pure
                    > body.</LI>[/color]

                    The <li> element type is to put items into lists. If you don't follow that
                    part of the specification, then what makes you think the advice given in
                    other parts of the specification will still hold true?

                    HTML and CSS are not designed to obviate the need for human intelligence
                    when marking up documents. Is it a list? No? The don't use any of the
                    list element types.


                    [snip][color=blue]
                    > CSS it just an Eldorado for spammers. They can full any content analyzer.[/color]

                    CSS isn't content.


                    --
                    Jim Dabell

                    Comment

                    Working...