HighDots Forums  

grid structures: TABLE/TR/TD vs. DIV

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss grid structures: TABLE/TR/TD vs. DIV in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 05:14 AM






On Mon, 1 May 2006, phil-news-nospam (AT) ipal (DOT) net wrote:

Quote:
Show me CSS2 coding that will produce tables with the same semantics
that TABLE/TR/TD has, and maybe I could believe it's an
implementatuon issue.
You're not making any kind of sense. The defined semantics of HTML
are what the HTML specification (for all its faults and weaknesses)
defines them to be. They don't change merely by fiddling around with
implementations of CSS.



Reply With Quote
  #12  
Old   
Charles Allen
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 07:29 AM






Quote:
|> rule. In some cases background colors are _content_. One example
|> is the red and black colors of a Chess board. Sure, someone could

| Odd, most of the (real) chessboards I've seen are yellow and
| black. Maybe it varies from place to place.

I've seen a couple like that. But virtually all are red and black.
Standard colors are off-white and green and off-white and brown.
Having "black" as the dark color is allowed, but many players feel
that gives too little contrast between the dark pieces and the dark
squares.

From <http://www.fide.com/> in the Info section you can find the FIDE
recommendations for boards:

3. Chess boards

Wood, plastic, cardboard or cloth are recommended as material for
chessboards. The board may also be of stone or marble with
appropriate light and dark colours, provided the Chief Arbiter
finds it acceptable. Natural wood with sufficient contrast, such
as birch, maple or European ash against walnut, teak, beech,
etc., may also be used for boards, which must have a dull or
neutral finish, never shiny.

Combination of colours such as brown, green, or very light tan
and white, cream, off-white ivory, buff, etc., may be used for
the chess squares in addition to natural colours.

Now back to our actual newsgroup topic.
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth


Reply With Quote
  #13  
Old   
Chris Morris
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 07:41 AM



phil-news-nospam (AT) ipal (DOT) net writes:
Quote:
On 30 Apr 2006 19:26:38 +0100 Chris Morris <c.i.morris (AT) durham (DOT) ac.uk> wrote:
| Odd, most of the (real) chessboards I've seen are yellow and
| black. Maybe it varies from place to place.

I've seen a couple like that. But virtually all are red and black.
I'm not sure I've seen any red and black ones.

Maybe you should use CSS and let people select their own preferred
chess-board colours with alternative stylesheets.

Quote:
|> if I am going to lay out a grid structure as a Chess board, you can
|> bet I'm going to set the colors in the HTML tags.
|
| I can't imagine a situation where HTML-based colour setting would be
| more reliable than CSS-based colour setting in such a situation, with
| modern browsers at least - every graphical browser I know with an
| "ignore CSS" option also has some form of "ignore colours" option. If
| the colour is truly part of the content then perhaps an image (with
| suitable text alternative) is the better way to provide the
| information?

So how should the image be done? Don't forget it will be background.
There may be an image and/or text placed over it.
Well, again, CSS is not going to be more or less 'reliable' than HTML
at positioning and providing the image (though CSS has more options).

I'm having trouble thinking of a situation where you'd want a
background image of a chessboard (or a background grid in checkerboard
colours with the exact colour crucial) with text and images
superimposed. Could you give a bit more detailed example (with a URL
if you can) of the sort of thing you mean?

Quote:
|> And I'm not going to use "float:left" to layout a Chess board, either.
|
| I'd have thought a chess board was certainly tabular data.

It probably comes down to what people see as tabular and not tabular.
Well, when I sketch chessboards out on paper, they end up as a grid
rather than linearised, which suggests a table. The 2-D relationship
of the squares and pieces is crucial to understanding the position.

Quote:
When I want to align a set of boxes to hold blocks of text, such as
news items, I tend to want the behaviour TABLE/TR/TD bring, rather
than the behaviour I get with DIV+float.
Whereas if I was writing a news item with a pencil (or for an email) I
probably wouldn't be so concerned with the layout as long as it was in
the right 1-D order.

That's not to say a set of news items can't be expressed sensibly in a
table - it depends how the data for each news item is divided.

Quote:
| Does IE7 support 'position: table-*'? That gives much the same layout
| options but doesn't interfere with table-reading mode so much. (Of
| course, even if it does, it'll be a couple of years before it's
| generally usable)

I have no idea. No IE running here of any version right now.
Well, if IE is out of the equation, and you only want the grid for
visual presentation, you might as well use position: table-*

--
Chris


Reply With Quote
  #14  
Old   
phil-news-nospam@ipal.net
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 01:10 PM



On 01 May 2006 12:41:20 +0100 Chris Morris <c.i.morris (AT) durham (DOT) ac.uk> wrote:

Quote:
phil-news-nospam (AT) ipal (DOT) net writes:
On 30 Apr 2006 19:26:38 +0100 Chris Morris <c.i.morris (AT) durham (DOT) ac.uk> wrote:
| Odd, most of the (real) chessboards I've seen are yellow and
| black. Maybe it varies from place to place.

I've seen a couple like that. But virtually all are red and black.

I'm not sure I've seen any red and black ones.

Maybe you should use CSS and let people select their own preferred
chess-board colours with alternative stylesheets.
Fine. Show how.


Quote:
|> if I am going to lay out a grid structure as a Chess board, you can
|> bet I'm going to set the colors in the HTML tags.
|
| I can't imagine a situation where HTML-based colour setting would be
| more reliable than CSS-based colour setting in such a situation, with
| modern browsers at least - every graphical browser I know with an
| "ignore CSS" option also has some form of "ignore colours" option. If
| the colour is truly part of the content then perhaps an image (with
| suitable text alternative) is the better way to provide the
| information?

So how should the image be done? Don't forget it will be background.
There may be an image and/or text placed over it.

Well, again, CSS is not going to be more or less 'reliable' than HTML
at positioning and providing the image (though CSS has more options).
But how well can CSS choose which squares to color? If the browser
supports :first-child then you can color the top and left ones different.


Quote:
I'm having trouble thinking of a situation where you'd want a
background image of a chessboard (or a background grid in checkerboard
colours with the exact colour crucial) with text and images
superimposed. Could you give a bit more detailed example (with a URL
if you can) of the sort of thing you mean?
You want to color in CSS. Be my guest. Show how. But show CSS that
can be used with any chess board in tables where only the table element
has a class on it.


Quote:
|> And I'm not going to use "float:left" to layout a Chess board, either.
|
| I'd have thought a chess board was certainly tabular data.

It probably comes down to what people see as tabular and not tabular.

Well, when I sketch chessboards out on paper, they end up as a grid
rather than linearised, which suggests a table. The 2-D relationship
of the squares and pieces is crucial to understanding the position.
However, the "CSS people" still often whine about the use of tables
for stuff that needs to be 2-D.


Quote:
When I want to align a set of boxes to hold blocks of text, such as
news items, I tend to want the behaviour TABLE/TR/TD bring, rather
than the behaviour I get with DIV+float.

Whereas if I was writing a news item with a pencil (or for an email) I
probably wouldn't be so concerned with the layout as long as it was in
the right 1-D order.

That's not to say a set of news items can't be expressed sensibly in a
table - it depends how the data for each news item is divided.
Within an item, sure, it would basically be 1-D. But when categorizing
items, and ordering them by some priority or date, then you may want a
grid structure. And tables seems nature for it.


Quote:
| Does IE7 support 'position: table-*'? That gives much the same layout
| options but doesn't interfere with table-reading mode so much. (Of
| course, even if it does, it'll be a couple of years before it's
| generally usable)

I have no idea. No IE running here of any version right now.

Well, if IE is out of the equation, and you only want the grid for
visual presentation, you might as well use position: table-*
The table/tr/td elements are still needed to markup what content goes in
which cell. At that point, it works fine so I don't see the need for a
position property.

--
-----------------------------------------------------------------------------
Quote:
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
(first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


Reply With Quote
  #15  
Old   
phil-news-nospam@ipal.net
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 01:12 PM



On Mon, 01 May 2006 10:50:36 +0200 Johannes Koch <koch (AT) w3development (DOT) de> wrote:
Quote:
phil-news-nospam (AT) ipal (DOT) net wrote:
Show me CSS2 coding that will produce tables with the same semantics that
TABLE/TR/TD has, and maybe I could believe it's an implementatuon issue.

_Semantics_ are defined by HTML, not CSS: If you have tabular data and
so table semantics are appropriate, use the table element and its
companions. CSS however defines table-like _presentation_
characteristics. See the chapter about tables in the CSS 2(.1) spec.
It probably comes down to the fact that my intentions in a grid structure
do match the semantics of a table and tabular data, despite that it may
not appear that way to people that tell me to not use the table element.

--
-----------------------------------------------------------------------------
Quote:
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
(first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


Reply With Quote
  #16  
Old   
phil-news-nospam@ipal.net
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 01:14 PM



On Mon, 1 May 2006 10:14:35 +0100 Alan J. Flavell <flavell (AT) physics (DOT) gla.ac.uk> wrote:
Quote:
On Mon, 1 May 2006, phil-news-nospam (AT) ipal (DOT) net wrote:

Show me CSS2 coding that will produce tables with the same semantics
that TABLE/TR/TD has, and maybe I could believe it's an
implementatuon issue.

You're not making any kind of sense. The defined semantics of HTML
are what the HTML specification (for all its faults and weaknesses)
defines them to be. They don't change merely by fiddling around with
implementations of CSS.
Of course it doesn't make sense. It was to get people to think about
the fact that it actually cannot be done (the same way) in CSS2.

--
-----------------------------------------------------------------------------
Quote:
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
(first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


Reply With Quote
  #17  
Old   
Steve Pugh
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 02:29 PM



phil-news-nospam (AT) ipal (DOT) net wrote:
Quote:
On 01 May 2006 12:41:20 +0100 Chris Morris <c.i.morris (AT) durham (DOT) ac.uk> wrote:

| I'm having trouble thinking of a situation where you'd want a
| background image of a chessboard (or a background grid in checkerboard
| colours with the exact colour crucial) with text and images
| superimposed. Could you give a bit more detailed example (with a URL
| if you can) of the sort of thing you mean?

You want to color in CSS. Be my guest. Show how. But show CSS that
can be used with any chess board in tables where only the table element
has a class on it.
A somewhat artificial restriction but here you go:

http://steve.pugh.net/test/chessboard.html

Works in Opera and FireFox and IE7, I presume it will work in Safari.

As in many situations, IE6 and lower are the problem, not the CSS
spec.

The amount of code can be reduce consideranly if you would allow
classes to be set on the <tr> elements.

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 (AT) pugh (DOT) net> <http://steve.pugh.net/>


Reply With Quote
  #18  
Old   
Chris Morris
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 05:02 PM



phil-news-nospam (AT) ipal (DOT) net writes:
Quote:
On 01 May 2006 12:41:20 +0100 Chris Morris <c.i.morris (AT) durham (DOT) ac.uk> wrote:
| Maybe you should use CSS and let people select their own preferred
| chess-board colours with alternative stylesheets.

Fine. Show how.
<link rel="stylesheet" href="cbcolours.css?c1=ff0000;c2=000000"
type="text/css">
(where cbcolours.css is a script that parses the colours and returns a
stylesheet, and the above <link> is also generated via scripting)

Use of rel="alternate stylesheet" could let you do it without any
scripting if you used only a few possible colour schemes.

Quote:
| Well, again, CSS is not going to be more or less 'reliable' than HTML
| at positioning and providing the image (though CSS has more options).

But how well can CSS choose which squares to color? If the browser
supports :first-child then you can color the top and left ones different.
Well, if you were doing it with HTML you'd have to colour each cell
individually anyway, so you don't lose anything by using CSS and you
gain only having to change two values instead of 64 if you decide to
use different colours.

(and of course there is a solution in another post even given the
restriction of not individually classing table cells)

Quote:
| Well, when I sketch chessboards out on paper, they end up as a grid
| rather than linearised, which suggests a table. The 2-D relationship
| of the squares and pieces is crucial to understanding the position.

However, the "CSS people" still often whine about the use of tables
for stuff that needs to be 2-D.
People have different views on what is best expressed 2-D and what is
best expressed 1-D. There's a grey area in which it would work either
way, definitely.

It doesn't help that the occasional person (as seen in the group
archives) interprets "don't use tables for layout" as "don't use
tables" or "don't use tables to lay out data with a relationship
between the rows and columns"

Quote:
| Whereas if I was writing a news item with a pencil (or for an email) I
| probably wouldn't be so concerned with the layout as long as it was in
| the right 1-D order.
|
| That's not to say a set of news items can't be expressed sensibly in a
| table - it depends how the data for each news item is divided.

Within an item, sure, it would basically be 1-D. But when categorizing
items, and ordering them by some priority or date, then you may want a
grid structure. And tables seems nature for it.
I assume you mean something like
<table>
<thead><tr><th>Date</th><th>Title</th><th>Article<th></tr></thead>
<tbody>...<!-- 1 news article per row -->...</tbody>
</table>
(exact column headings and even if the <thead> block needs to be
explicitly displayed varying depending on exactly what you're doing,
of course)

I don't think there's anything wrong with that (although if the full
text of the news articles was being included in the table, I'd
probably do it differently unless the full text was very short)

--
Chris


Reply With Quote
  #19  
Old   
W˙rm
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-01-2006 , 05:49 PM




<phil-news-nospam (AT) ipal (DOT) net> kirjoitti
viestissä:e35fio11vup (AT) news2 (DOT) newsguy.com...

<snip>

Quote:
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.

<snip>




Reply With Quote
  #20  
Old   
phil-news-nospam@ipal.net
 
Posts: n/a

Default Re: grid structures: TABLE/TR/TD vs. DIV - 05-02-2006 , 02:11 AM



On Mon, 01 May 2006 19:29:26 +0100 Steve Pugh <steve (AT) pugh (DOT) net> wrote:
Quote:
phil-news-nospam (AT) ipal (DOT) net wrote:
On 01 May 2006 12:41:20 +0100 Chris Morris <c.i.morris (AT) durham (DOT) ac.uk> wrote:

| I'm having trouble thinking of a situation where you'd want a
| background image of a chessboard (or a background grid in checkerboard
| colours with the exact colour crucial) with text and images
| superimposed. Could you give a bit more detailed example (with a URL
| if you can) of the sort of thing you mean?

You want to color in CSS. Be my guest. Show how. But show CSS that
can be used with any chess board in tables where only the table element
has a class on it.

A somewhat artificial restriction but here you go:

http://steve.pugh.net/test/chessboard.html
That's gross!


Quote:
Works in Opera and FireFox and IE7, I presume it will work in Safari.

As in many situations, IE6 and lower are the problem, not the CSS
spec.

The amount of code can be reduce consideranly if you would allow
classes to be set on the <tr> elements.
Well, I wanted it to be able to handle whatever size chess board that
happens to be in the HTML. I should have said it in such a way.

I think it comes down to whether identifying that specific positions
have specific colors is a matter of content or style or ... layout.
I just don't accept that the dividing line between CSS and HTML is
really at where the theoretical dividing line between style and content
would be.

--
-----------------------------------------------------------------------------
Quote:
Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
(first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.