By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,677 Members | 1,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,677 IT Pros & Developers. It's quick & easy.

is DIV really better than TABLE ?

P: n/a
Mel
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
Jul 20 '05 #1
Share this Question
Share on Google+
21 Replies


P: n/a
Mel wrote:
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 ?


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
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #2

P: n/a
Mel wrote:
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 ?


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
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #3

P: n/a
On Thu, 15 Apr 2004, Mel wrote:
what is a GOOD reason to use DIVs instead ?


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

Jul 20 '05 #4

P: n/a
On Thu, 15 Apr 2004, Mel wrote:
what is a GOOD reason to use DIVs instead ?


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

Jul 20 '05 #5

P: n/a
Andreas Prilop wrote:
On Thu, 15 Apr 2004, Mel wrote:
what is a GOOD reason to use DIVs instead ?

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


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/>
Jul 20 '05 #6

P: n/a
Andreas Prilop wrote:
On Thu, 15 Apr 2004, Mel wrote:
what is a GOOD reason to use DIVs instead ?

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


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/>
Jul 20 '05 #7

P: n/a
Mel me**********@ssa.gov wrote:
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 ?


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
www.ericjarvis.co.uk
we don't need to make things idiot-proof,
we need to make idiots thing-proof
Jul 20 '05 #8

P: n/a
Mel me**********@ssa.gov wrote:
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 ?


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
www.ericjarvis.co.uk
we don't need to make things idiot-proof,
we need to make idiots thing-proof
Jul 20 '05 #9

P: n/a
Mel wrote:
i see a lot of stuff going back and forth,
You mean in ciwah? But you didn't want to comment in those threads? It's
hard to know exactly what you saw.
tables are easy to use and do exactly what the name says it does
ROWS/COLUMNS
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.
what is a GOOD reason to use DIVs instead ?


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)
http://www.tsmchughs.com/
Jul 20 '05 #10

P: n/a
Mel wrote:
i see a lot of stuff going back and forth,
You mean in ciwah? But you didn't want to comment in those threads? It's
hard to know exactly what you saw.
tables are easy to use and do exactly what the name says it does
ROWS/COLUMNS
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.
what is a GOOD reason to use DIVs instead ?


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)
http://www.tsmchughs.com/
Jul 20 '05 #11

P: n/a
Mel scribbled something along the lines of:
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


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
http://www.mushroom-cloud.com/
Jul 20 '05 #12

P: n/a
Ashmodai wrote:
Mel scribbled something along the lines of:
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 ?
[snip] 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.
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!
You should try to avoid tabular layout -- if it is needed, provide it
with CSS, the way it's meant to be.
Some people, with no official standing whatsoever, say that. It is better to
look at the recommendations.
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.
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.
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.
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).
I would suggest reading up some up-to-date info on (X)HTML and CSS.


"A brief history of tables"
http://www.barry.pearson.name/articl...es/history.htm

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #13

P: n/a
Barry Pearson scribbled something along the lines of:
<snip/>
You should try to avoid tabular layout -- if it is needed, provide it
with CSS, the way it's meant to be.

Some people, with no official standing whatsoever, say that. It is better to
look at the recommendations.


Which I did.
Read my reply to the table thread <c5*************@news.t-online.com>.

<snip/>
I would suggest reading up some up-to-date info on (X)HTML and CSS.

"A brief history of tables"
http://www.barry.pearson.name/articl...es/history.htm


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

--
Alan Plum, WAD/WD, Mushroom Cloud Productions
http://www.mushroom-cloud.com/
Jul 20 '05 #14

P: n/a
Quoth the raven named Barry Pearson:
Right from their start in about 1993, tables were intended, inter
alia, for laying out complex material in rows & columns.


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.
Jul 20 '05 #15

P: n/a
Beauregard T. Shagnasty scribbled something along the lines of:
Quoth the raven named Barry Pearson:
Right from their start in about 1993, tables were intended, inter
alia, for laying out complex material in rows & columns.

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.


I'd say he just read that phrase this morning and found it quite catchy
so he just likes to use it now.

I heard Americans and British have a strange fascination with foreign
language phrases.

Carpet diet or how they say. =P
--
Alan Plum, WAD/WD, Mushroom Cloud Productions
http://www.mushroom-cloud.com/
Jul 20 '05 #16

P: n/a
Beauregard T. Shagnasty wrote:
Quoth the raven named Barry Pearson:
Right from their start in about 1993, tables were intended, inter
alia, for laying out complex material in rows & columns.
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.


I've used it for many years, and seen it used for many years.

If it confused you, I apologise.
"laying out complex material in rows & columns"

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


I don't feel that. I feel that "complex material" means "complex material".
Please don't make up false statements about what I feel.

Raggett said in 1993: "Cells may contain, text, multiple paragraphs, lists and
headers". "Paragraphs can include the following: ... Images which act as
single characters and which can be vertically aligned relative to the text
line in which they are embedded ... Hypertext Links based on the URL or URN
notations".
http://www.w3.org/MarkUp/HTMLPlus/htmlplus_1.html

That sounds like "complex material". And it got even more complex in 1997,
when nested tables were included.
http://www.w3.org/TR/REC-html32#table

I'll repeat my statement that is under discussion here: "Right from their
start in about 1993, tables were intended, inter alia, for laying out complex
material in rows & columns".

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #17

P: n/a
Ashmodai wrote:
Beauregard T. Shagnasty scribbled something along the lines of:

[snip]>
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.


I'd say he just read that phrase this morning and found it quite
catchy so he just likes to use it now.

[snip]

Oh, gosh! Google Groups archive has a history of my use of this term, going
back years.

http://tinyurl.com/22pfd

I guess you didn't bother to check!

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #18

P: n/a
Ashmodai wrote:
Barry Pearson scribbled something along the lines of:

[snip]

I've just responded at length to another post. There is no point in responding
further to this one.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #19

P: n/a
Quoth the raven named Barry Pearson:
Beauregard T. Shagnasty wrote:
Quoth the raven named Barry Pearson:
Right from their start in about 1993, tables were intended, inter
alia, for laying out complex material in rows & columns.


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.


I've used it for many years, and seen it used for many years.

If it confused you, I apologise.


No, it didn't confuse me.
"laying out complex material in rows & columns"

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


I don't feel that. I feel that "complex material" means "complex material".
Please don't make up false statements about what I feel.


Ok, my turn to apologize.

You're probably the only [regular poster] left [in these groups] who
feels that "complex material" [includes] presentation <strike>, rather
than content</strike>.

<snip rest of boilerplate>

--
-bts
-This space intentionally left blank.
Jul 20 '05 #20

P: n/a
Beauregard T. Shagnasty wrote:
Quoth the raven named Barry Pearson: [snip] You're probably the only [regular poster] left [in these groups] who
feels that "complex material" [includes] presentation <strike>, rather
than content</strike>.

[snip]

I haven't a clue what that statement means!

I suggest you don't try to state what I feel without first checking what I
feel. It is unlikely that you will be correct, and I assume you don't want to
post inaccurate statements.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #21

P: n/a
Barry Pearson scribbled something along the lines of:
Beauregard T. Shagnasty wrote:
Quoth the raven named Barry Pearson:


[snip]
You're probably the only [regular poster] left [in these groups] who
feels that "complex material" [includes] presentation <strike>, rather
than content</strike>.


[snip]

I haven't a clue what that statement means!

I suggest you don't try to state what I feel without first checking what I
feel. It is unlikely that you will be correct, and I assume you don't want to
post inaccurate statements.


He's suggesting you are the only person here thinking that "complex
material" may include presentation(al markup).

--
Alan Plum, WAD/WD, Mushroom Cloud Productions
http://www.mushroom-cloud.com/
Jul 20 '05 #22

This discussion thread is closed

Replies have been disabled for this discussion.