473,769 Members | 4,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

grid structures: TABLE/TR/TD vs. DIV

Is there really any advantage to using DIV elements with float style
properies, vs. the old method of TABLE and TR and TD?

I'm finding that by using DIV, it still involves the same number of
elements in the HTML to get everything just right. When you consider
the class attribute on the DIV elements, there's not much size savings
anymore for using DIV.

There are other disadvantages to not using TABLE/TR/TD, such as the
lack of ability to merge cells, and keeping rows and columns aligned
with each other under varying content.

Content should be in HTML and style in CSS. So how is that affected
by whether the HTML markup has TABLE/TR/TD or just DIV.

Note that I am not talking about the use of additional tables and cells
to create stylistic effects in the grid, such as spacing between cells.
This can be done in CSS regardless of whether the elemnts involved are
TABLE/TR/TD or just DIV.

I bet someone has already written "Tables considered harmful". But is
it really justified?

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Apr 30 '06
117 18572
On Tue, 02 May 2006 09:54:54 +0200 Johannes Koch <ko**@w3develop ment.de> wrote:
| ph************* *@ipal.net wrote:
|> On Tue, 2 May 2006 00:49:04 +0300 "W?rm" <no************ *@north.invalid > wrote:
|> | If it's tabular data, use table. It's that simple.
|>
|> I cannot say that it _is_ tabular data. I can say that it needs the
|> same _behaviour_ as tabular data.
|
| Then the HTML table elements would not be appropriate. But you could use
| the CSS table stuff. Don't blame CSS for not offering presentation
| characteristics you need, when in fact it's some user agent(s) that
| lack(s) implementation.

Why would there be 2 different non-depricated mechanisms in the standards
that accomplish exactly the same thing?

"A table of numbers from a spread sheet"
"A table of images" (note, NOT use of tables to mosaic the images together)
"A table of whatever stuff you want to have a table of"

I don't see why different mechanisms have to be used when the concept of
how it is organized is the same regardless of the contents.

I'll use what works. When I want to get a web site done, I'm not going
to be a standards purist when the implementations aren't keeping up.
The "web standards" community for years did little or nothing to help
get browsers usable so the new standards could even be widely used.
Netscape went all to hell in version 4 and until Firefox 1.5, there was
plenty of reason to stay behind in browsers (and for plenty of reasons
beyond the scope of compliance with standards). I asked certain people
who were prominant in the "web standards" community to help by pushing
hard (in a public way) to get browsers fixed. But instead, all they
would do is stress how important web standards were. And that turned
a lot of people off.

Blaming CSS would not be right if the standards provide for a way to do
regardless of what implementations may or may not. Of course it would
be nice to have a list of what features don't work (or work wrong) in
which browsers.

Firefox is available for the major platforms. IE is not. If I have to
tell someone to use another browser, it's going to be Firefox. At least
I now have that option. So the big question is, how well does Firefox
implement CSS? It seems to be working fairly well. Who has IE7 to show
and tell?

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 2 '06 #41
On Tue, 2 May 2006 13:27:39 +0300 "W?rm" <no************ *@north.invalid > wrote:

| So DIV with heading and list of links, three columns split in 3 divs
| floated, and in each column those div boxes with heading + list of links...

How to keep the columns from floating down to the bottom when the window
is narrower?

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 2 '06 #42
ph************* *@ipal.net wrote:
On Tue, 02 May 2006 09:54:54 +0200 Johannes Koch <ko**@w3develop ment.de> wrote:
| Then the HTML table elements would not be appropriate. But you could use
| the CSS table stuff. Don't blame CSS for not offering presentation
| characteristics you need, when in fact it's some user agent(s) that
| lack(s) implementation.

Why would there be 2 different non-depricated mechanisms in the standards
that accomplish exactly the same thing?


Because they are two different things: One (HTML tables) is markup for
tabular data. E.g. it includes the "Table rendering by non-visual user
agents" (HTML 4.01, section 11.4). The other (CSS table presentation
model) is just for presenting content in a certain way (a grid).
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
May 2 '06 #43
On Tue, 02 May 2006 22:25:17 +0200 Johannes Koch <ko**@w3develop ment.de> wrote:
| ph************* *@ipal.net wrote:
|> On Tue, 02 May 2006 09:54:54 +0200 Johannes Koch <ko**@w3develop ment.de> wrote:
|> | Then the HTML table elements would not be appropriate. But you could use
|> | the CSS table stuff. Don't blame CSS for not offering presentation
|> | characteristics you need, when in fact it's some user agent(s) that
|> | lack(s) implementation.
|>
|> Why would there be 2 different non-depricated mechanisms in the standards
|> that accomplish exactly the same thing?
|
| Because they are two different things: One (HTML tables) is markup for
| tabular data. E.g. it includes the "Table rendering by non-visual user
| agents" (HTML 4.01, section 11.4). The other (CSS table presentation
| model) is just for presenting content in a certain way (a grid).

So why not use the CSS table presentation model for the tubular data?
Or is there some difference in the exact semantics of these methods?
Why have two mechanisms that work the same way?

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 3 '06 #44

<ph************ **@ipal.net> kirjoitti
viestissä:e3*** ******@news4.ne wsguy.com...

<snip>
How to keep the columns from floating down to the bottom when the window
is narrower?


Let them float down instead of trying to prevent it, don't make issue from
something that is not. There are ways to prevent it though, but I'd rather
see stuff to adjust to viewport so...
May 3 '06 #45
In article <Pi************ *************** ****@ppepc87.ph .gla.ac.uk>,
Alan J. Flavell <fl*****@physic s.gla.ac.uk> wrote:
In the sense that CSS is optional by design, it "works" to
specificatio n in IE. It's just that IE chooses not to take the
option.


Not really... It would be nice if IE actually did consider CSS
optional and choose not to take the option. Instead, it chooses to
implement the option incorrectly. That's a totally different thing.

-A
May 3 '06 #46
ph************* *@ipal.net wrote:
On Tue, 02 May 2006 22:25:17 +0200 Johannes Koch <ko**@w3develop ment.de> wrote:
| Because they are two different things: One (HTML tables) is markup for
| tabular data. E.g. it includes the "Table rendering by non-visual user
| agents" (HTML 4.01, section 11.4). The other (CSS table presentation
| model) is just for presenting content in a certain way (a grid).

So why not use the CSS table presentation model for the tubular data?


In many browsers the CSS table presentation model _is_ used for
presenting table/tr/td etc. That's the default rendering.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
May 3 '06 #47
ph************* *@ipal.net wrote:
Why have two mechanisms that work the same way?


Why is there a strong element in HTML, when CSS offers 'font-weight:
bold'? Same answer.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
May 3 '06 #48
To further the education of mankind, "W˙rm"
<no************ *@north.invalid > vouchsafed:

<ph************ **@ipal.net> kirjoitti
viestissä:e3*** ******@news2.ne wsguy.com...

<snip>
It probably comes down to the fact that my intentions in a grid
structure do match the semantics of a table and tabular data.


If it's tabular data, use table. It's that simple.

If table is just there to do layout certain way when data is _NOT
tabular_, don't, there are almost certainly better ways to do that
layout.


A chessboard grid is not tabular data, it's structured data. There is a
difference.

Here's a mock-up I made using someone's visual example from above. Putting
all the ridiculous artificial restrictions aside, it uses no tables, is
fluid, and works in IE. It, unfortunately, doesn't work in Opera because
of Opera's flawed graphic technology.

http://www.neredbojias.com/zyxix/chess/chss2.html

As I intimated, it's just a prototype, but I think it could be a decent
base for a dynamic chess page.

--
Neredbojias
Infinity has its limits.
May 3 '06 #49

"Neredbojia s" <http://www.neredbojias .com/fliam.php?cat=a lt.html> kirjoitti
viestissä:Xn*** *************** *************** @208.49.80.251. ..

<snip>
If it's tabular data, use table. It's that simple.

If table is just there to do layout certain way when data is _NOT
tabular_, don't, there are almost certainly better ways to do that
layout.


A chessboard grid is not tabular data, it's structured data. There is a
difference.


And where did I say it is? Incase it escaped you what I meant above.

Translation: (spell it word by word if meaning still happily escapes from
you)

If
it's
tabular
data,
use
table.
It's
that
simple.

And data in it meaning _ANY_ data, not just some silly chess stuff.
May 3 '06 #50

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.