is DIV really better than TABLE ?

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

    is DIV really better than TABLE ?

    i see a lot of stuff going back and forth, tables are easy to use and do
    exactly what the name says it does ROWS/COLUMNS

    what is a GOOD reason to use DIVs instead ?

    thanks
    Mel


  • Barry Pearson

    #2
    Re: is DIV really better than TABLE ?

    Mel wrote:[color=blue]
    > i see a lot of stuff going back and forth, tables are easy to use and
    > do exactly what the name says it does ROWS/COLUMNS
    >
    > what is a GOOD reason to use DIVs instead ?[/color]

    If you think of it as either / or, one instead of the other, you are missing a
    major opportunity.

    Each has advantages & disadvantages, and sometimes one is best, sometimes the
    other. And in combination you can sometimes do things that would be harder
    with just one of them.

    --
    Barry Pearson


    This site provides information & analysis of child support & the Child Support Agency in the UK, mainly for lobbyists, politicians, academics & media.



    Comment

    • Barry Pearson

      #3
      Re: is DIV really better than TABLE ?

      Mel wrote:[color=blue]
      > i see a lot of stuff going back and forth, tables are easy to use and
      > do exactly what the name says it does ROWS/COLUMNS
      >
      > what is a GOOD reason to use DIVs instead ?[/color]

      If you think of it as either / or, one instead of the other, you are missing a
      major opportunity.

      Each has advantages & disadvantages, and sometimes one is best, sometimes the
      other. And in combination you can sometimes do things that would be harder
      with just one of them.

      --
      Barry Pearson


      This site provides information & analysis of child support & the Child Support Agency in the UK, mainly for lobbyists, politicians, academics & media.



      Comment

      • Andreas Prilop

        #4
        Re: is DIV really better than TABLE ?

        On Thu, 15 Apr 2004, Mel wrote:
        [color=blue]
        > what is a GOOD reason to use DIVs instead ?[/color]

        No good reason.
        <DIV> in HTML is just as bad as "applicatio n/octet-stream" in MIME.
        Both have no meaning.

        Comment

        • Andreas Prilop

          #5
          Re: is DIV really better than TABLE ?

          On Thu, 15 Apr 2004, Mel wrote:
          [color=blue]
          > what is a GOOD reason to use DIVs instead ?[/color]

          No good reason.
          <DIV> in HTML is just as bad as "applicatio n/octet-stream" in MIME.
          Both have no meaning.

          Comment

          • David Dorward

            #6
            Re: is DIV really better than TABLE ?

            Andreas Prilop wrote:[color=blue]
            > On Thu, 15 Apr 2004, Mel wrote:[/color]
            [color=blue][color=green]
            >> what is a GOOD reason to use DIVs instead ?[/color][/color]
            [color=blue]
            > No good reason.[/color]
            [color=blue]
            > <DIV> in HTML is just as bad as "applicatio n/octet-stream" in MIME.
            > Both have no meaning.[/color]

            Of course application/octet-stream is better then text/html when the data
            being sent is a windows executable file.

            --
            David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>

            Comment

            • David Dorward

              #7
              Re: is DIV really better than TABLE ?

              Andreas Prilop wrote:[color=blue]
              > On Thu, 15 Apr 2004, Mel wrote:[/color]
              [color=blue][color=green]
              >> what is a GOOD reason to use DIVs instead ?[/color][/color]
              [color=blue]
              > No good reason.[/color]
              [color=blue]
              > <DIV> in HTML is just as bad as "applicatio n/octet-stream" in MIME.
              > Both have no meaning.[/color]

              Of course application/octet-stream is better then text/html when the data
              being sent is a windows executable file.

              --
              David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>

              Comment

              • Eric Jarvis

                #8
                Re: is DIV really better than TABLE ?

                Mel mehra.heravi@ss a.gov wrote:[color=blue]
                > i see a lot of stuff going back and forth, tables are easy to use and do
                > exactly what the name says it does ROWS/COLUMNS
                >
                > what is a GOOD reason to use DIVs instead ?
                >[/color]

                because you can do a LOT more than you can with tables and you can do it
                with far less effort once you've learned the basics of css

                --
                eric

                we don't need to make things idiot-proof,
                we need to make idiots thing-proof

                Comment

                • Eric Jarvis

                  #9
                  Re: is DIV really better than TABLE ?

                  Mel mehra.heravi@ss a.gov wrote:[color=blue]
                  > i see a lot of stuff going back and forth, tables are easy to use and do
                  > exactly what the name says it does ROWS/COLUMNS
                  >
                  > what is a GOOD reason to use DIVs instead ?
                  >[/color]

                  because you can do a LOT more than you can with tables and you can do it
                  with far less effort once you've learned the basics of css

                  --
                  eric

                  we don't need to make things idiot-proof,
                  we need to make idiots thing-proof

                  Comment

                  • Brian

                    #10
                    Re: is DIV really better than TABLE ?

                    Mel wrote:
                    [color=blue]
                    > i see a lot of stuff going back and forth,[/color]

                    You mean in ciwah? But you didn't want to comment in those threads? It's
                    hard to know exactly what you saw.
                    [color=blue]
                    > tables are easy to use and do exactly what the name says it does
                    > ROWS/COLUMNS[/color]

                    Absolutely. Rows using <tr> and columns in <td> (table data) or <th>
                    (table header). But then, I find most elements easy to use. In fact,
                    table markup is actually the most difficult to work with, since you must
                    make sure that each row has the same number of columns. Still, you are
                    right: it is not difficult to create the markup.
                    [color=blue]
                    > what is a GOOD reason to use DIVs instead ?[/color]

                    Instead? If you have tabular data, you should use table markup. That's
                    what it's for. Did you mean, "what is a GOOD reason to use DIVs instead
                    [of tables for layout]?"

                    --
                    Brian (remove "invalid" from my address to email me)

                    Comment

                    • Brian

                      #11
                      Re: is DIV really better than TABLE ?

                      Mel wrote:
                      [color=blue]
                      > i see a lot of stuff going back and forth,[/color]

                      You mean in ciwah? But you didn't want to comment in those threads? It's
                      hard to know exactly what you saw.
                      [color=blue]
                      > tables are easy to use and do exactly what the name says it does
                      > ROWS/COLUMNS[/color]

                      Absolutely. Rows using <tr> and columns in <td> (table data) or <th>
                      (table header). But then, I find most elements easy to use. In fact,
                      table markup is actually the most difficult to work with, since you must
                      make sure that each row has the same number of columns. Still, you are
                      right: it is not difficult to create the markup.
                      [color=blue]
                      > what is a GOOD reason to use DIVs instead ?[/color]

                      Instead? If you have tabular data, you should use table markup. That's
                      what it's for. Did you mean, "what is a GOOD reason to use DIVs instead
                      [of tables for layout]?"

                      --
                      Brian (remove "invalid" from my address to email me)

                      Comment

                      • Ashmodai

                        #12
                        Re: is DIV really better than TABLE ?

                        Mel scribbled something along the lines of:
                        [color=blue]
                        > i see a lot of stuff going back and forth, tables are easy to use and do
                        > exactly what the name says it does ROWS/COLUMNS
                        >
                        > what is a GOOD reason to use DIVs instead ?
                        >
                        > thanks
                        > Mel
                        >
                        >[/color]

                        The question is not "DIV or TABLE?".
                        Tables serve as a tool for presenting tabular data. DIVs serve as a
                        supplement for non-existent block level elements, i.e. you use them
                        where no other block level element would make sense.

                        Tables were never intended for presentation. CSS 3 provides some column
                        functionality (for any block level element) which is similar to the
                        layout used in newspapers and flyers though.

                        You should try to avoid tabular layout -- if it is needed, provide it
                        with CSS, the way it's meant to be.

                        Where p doesn't make sense because it's not a paragraph, table doesn't
                        make sense because it's not tabular data, a list doesn't make sense
                        because it isn't one and a blockquote doesn't make sense because it's
                        not a quote [and so on], that's where divs come into play.

                        DIVs are meant to be used as container elements to allow a certain way
                        of laying out the content in a graphical browser and to group content to
                        which certain styling should be applied, but which have no semantic
                        relationship which could be described using other block level elements.

                        I would suggest reading up some up-to-date info on (X)HTML and CSS.
                        --
                        Alan Plum, WAD/WD, Mushroom Cloud Productions

                        Comment

                        • Barry Pearson

                          #13
                          Re: is DIV really better than TABLE ?

                          Ashmodai wrote:[color=blue]
                          > Mel scribbled something along the lines of:[color=green]
                          >> i see a lot of stuff going back and forth, tables are easy to use
                          >> and do exactly what the name says it does ROWS/COLUMNS
                          >>
                          >> what is a GOOD reason to use DIVs instead ?[/color][/color]
                          [snip][color=blue]
                          > The question is not "DIV or TABLE?".
                          > Tables serve as a tool for presenting tabular data. DIVs serve as a
                          > supplement for non-existent block level elements, i.e. you use them
                          > where no other block level element would make sense.
                          >
                          > Tables were never intended for presentation. CSS 3 provides some
                          > column functionality (for any block level element) which is similar
                          > to the layout used in newspapers and flyers though.[/color]

                          Right from their start in about 1993, tables were intended, inter alia, for
                          laying out complex material in rows & columns.

                          I suspect that, at that time, people didn't think of layout as presentation.
                          Besides, it was to be a number of years before CSS appeared, so it was
                          academic anyway - HTML was the *only* way of achieving presentation!
                          [color=blue]
                          > You should try to avoid tabular layout -- if it is needed, provide it
                          > with CSS, the way it's meant to be.[/color]

                          Some people, with no official standing whatsoever, say that. It is better to
                          look at the recommendations .
                          [color=blue]
                          > Where p doesn't make sense because it's not a paragraph, table doesn't
                          > make sense because it's not tabular data, a list doesn't make sense
                          > because it isn't one and a blockquote doesn't make sense because it's
                          > not a quote [and so on], that's where divs come into play.[/color]

                          But who, other than the author or the audience, is qualified to make a
                          judgement on an of these? The HTML recommendation doesn't require that authors
                          submit their mark-up to scrutiny by linguistic experts.

                          If an author marks-up something as <p>...</p>, that isn't an invitation for
                          the web infrastructure to determine whether that is a true paragraph. It is a
                          simple statement: "please treat this as a paragraph, and do with it whatever
                          is appropriate for a paragraph". Ditto table, list, blockquote, etc.

                          <div> tends to make most sense as a container of other elements (plural) for
                          which some overall rule is to be applied.
                          [color=blue]
                          > DIVs are meant to be used as container elements to allow a certain way
                          > of laying out the content in a graphical browser and to group content
                          > to which certain styling should be applied, but which have no semantic
                          > relationship which could be described using other block level
                          > elements.[/color]

                          They can be *used* for that. Whether they were *meant* for that is a different
                          matter.

                          I believe <div> appeared (perhaps mid 1996?) before CSS became a
                          recommendation (end 1996).
                          [color=blue]
                          > I would suggest reading up some up-to-date info on (X)HTML and CSS.[/color]

                          "A brief history of tables"


                          --
                          Barry Pearson


                          This site provides information & analysis of child support & the Child Support Agency in the UK, mainly for lobbyists, politicians, academics & media.



                          Comment

                          • Ashmodai

                            #14
                            Re: is DIV really better than TABLE ?

                            Barry Pearson scribbled something along the lines of:
                            <snip/>[color=blue][color=green]
                            >>You should try to avoid tabular layout -- if it is needed, provide it
                            >>with CSS, the way it's meant to be.[/color]
                            >
                            >
                            > Some people, with no official standing whatsoever, say that. It is better to
                            > look at the recommendations .[/color]

                            Which I did.
                            Read my reply to the table thread <c5s9tp$ifa$03$ 1@news.t-online.com>.

                            <snip/>[color=blue][color=green]
                            >>I would suggest reading up some up-to-date info on (X)HTML and CSS.[/color]
                            >
                            >
                            > "A brief history of tables"
                            > http://www.barry.pearson.name/articl...es/history.htm[/color]

                            That is not up-to-date info on (X)HTML.



                            --
                            Alan Plum, WAD/WD, Mushroom Cloud Productions

                            Comment

                            • Beauregard T. Shagnasty

                              #15
                              Re: is DIV really better than TABLE ?

                              Quoth the raven named Barry Pearson:
                              [color=blue]
                              > Right from their start in about 1993, tables were intended, inter
                              > alia, for laying out complex material in rows & columns.[/color]

                              Is "inter alia" your word(s) of the day? Why not just say "among other
                              things?" I have never before heard your phrase used in normal
                              non-academic English conversation.

                              "laying out complex material in rows & columns"

                              You're probably the only one left who feels that "complex material"
                              means presentation, rather than content.

                              --
                              -bts
                              -This space intentionally left blank.

                              Comment

                              Working...