HighDots Forums  

Do all TRs need the same # of TDs?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Do all TRs need the same # of TDs? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Julian Roberts
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-02-2004 , 01:51 PM






I think there's maybe a red herring in here somewhere. One could have

<table>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
</table>

And I can imagine that for this kind of table structure, the presence of the
colspan attribute is largely irrelevant.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004



Reply With Quote
  #12  
Old   
darrel
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-02-2004 , 02:07 PM






Quote:
And I can imagine that for this kind of table structure, the presence of
the
colspan attribute is largely irrelevant.
Well, it is fairly relevant. Without it, for instance, IE will only have
that cell span the width of the first column. With it, it will span both
columns.

-Darrel




Reply With Quote
  #13  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-02-2004 , 02:16 PM



.oO(Julian Roberts)

Quote:
I think there's maybe a red herring in here somewhere. One could have

table
tr
td>&nbsp;</td
td>&nbsp;</td
/tr
tr
td colspan="2">&nbsp;</td
/tr
/table

And I can imagine that for this kind of table structure, the presence of the
colspan attribute is largely irrelevant.
Nope. With the colspan-attribute:

+---+---+
Quote:
| |
+---+---+
|
+-------+

Without it:

+---+---+
Quote:
| |
+---+---+
|
+---+

Micha


Reply With Quote
  #14  
Old   
Julian Roberts
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-02-2004 , 05:05 PM



Oh yeah! Can't think what I was thinking about there. I suppose what I'm
getting at is why it makes a difference to you that the datalist doesn't put
in that extra cell.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004



Reply With Quote
  #15  
Old   
darrel
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-02-2004 , 06:29 PM



Quote:
Oh yeah! Can't think what I was thinking about there. I suppose what I'm
getting at is why it makes a difference to you that the datalist doesn't
put
in that extra cell.
Well, it's not a proper table then. It will render in most browsers (though
I do recall older browsers having problems with it)...but the bigger issue
is that it gets difficult to properly style it with CSS.

I did some research and it appears to just be a huge oversight on MS's part.
Most (all?) of the controls that let you bind data and set a column numbers
will not build a proper table if the records aren't evenly divisible by the
columns.

The solution was to roll-my-own. I'm now have a label and I set the
label.text to HTML that I build by stepping through the dataset.

A bit of a pain. ;o)

-Darrel




Reply With Quote
  #16  
Old   
Julian Roberts
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-02-2004 , 06:51 PM



I still can't quite see what you mean. Do you need to do something special
with the odd row? If the datalist generates this for 3 records

<table>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>

how would the design be affected

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004




Reply With Quote
  #17  
Old   
Julian Roberts
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-02-2004 , 07:57 PM



I just asked the question on a .net list. They seem to agree that it is an
oversight too. An extra cell or colspan tag should be added. Just goes to
show what I know, lol.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004



Reply With Quote
  #18  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-04-2004 , 08:03 PM



.oO(darrel)

Quote:
I've looked through the W3C site trying to find a spec that says whether or
not each TR needs a balanced set of TDs, but I can't find anything. Anyone
have a definitive answer to this?
OK, me again ...

There's a section in the HTML 4 spec that should answer the question:

Calculating the number of columns in a table
http://www.w3.org/TR/html40/struct/tables.html#h-11.2.4.3

"[...} The number of columns is equal to the number of columns required
by the row with the most columns, including cells that span multiple
columns. For any row that has fewer than this number of columns, the end
of that row should be padded with empty cells. [...]"

Micha


Reply With Quote
  #19  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-06-2004 , 02:31 PM



So - the answer is YES. It matters.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Michael Fesser" <netizen (AT) gmx (DOT) net> wrote

Quote:
.oO(darrel)

I've looked through the W3C site trying to find a spec that says whether
or
not each TR needs a balanced set of TDs, but I can't find anything.
Anyone
have a definitive answer to this?

OK, me again ...

There's a section in the HTML 4 spec that should answer the question:

Calculating the number of columns in a table
http://www.w3.org/TR/html40/struct/tables.html#h-11.2.4.3

"[...} The number of columns is equal to the number of columns required
by the row with the most columns, including cells that span multiple
columns. For any row that has fewer than this number of columns, the end
of that row should be padded with empty cells. [...]"

Micha



Reply With Quote
  #20  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Do all TRs need the same # of TDs? - 07-06-2004 , 03:46 PM



.oO(Murray *TMM*)

Quote:
So - the answer is YES. It matters.
Huh?

The entire section is about user agents and how they should calculate
the number of columns.

If it would be addressed to the author, why would there be a statement
like "The number of columns is equal to the number of columns required
by the row with the most columns"? This is addressed to user agents. And
the next sentence (the padding issue) directly follows from that one.

So the answer is no, it doesn't matter, because the user agent handles
the "missing" cells.

Micha


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.