Apologies for the partial post that mysteriously escaped as I was composing.
I shall try again.
For many years I have been happily and successfully coding tables such that
the WIDTH
specified in a TD is the complete column width including any CELLPADDING.
For example for a 400 pixel wide table with four 100 pixel wide columns and
10 pixel cellpadding...
<TABLE WIDTH="400" BORDER="0" CELLSPACING="0" CELLPADDING="10 ">
<TR>
<TD WIDTH="100">
<TD WIDTH="100">
<TD WIDTH="100">
<TD WIDTH="100">
</TR>
</TABLE>
This is, to me, intuitive and is clearly how many others think it should be
done too judging by tutorials on the net and actual coding used. However
while using GoLive 6.01 (and this is not something I noticed with earlier
versions) I noticed that it considers that the WIDTH only covers the content
and excludes the CELLPADDING. So it would suggest...
<TABLE WIDTH="400" BORDER="0" CELLSPACING="0" CELLPADDING="10 ">
<TR>
<TD WIDTH="80">
<TD WIDTH="80">
<TD WIDTH="80">
<TD WIDTH="80">
</TR>
</TABLE>
....is actually correct and many seem to agree with this too. I'd like to
think Adobe know more about it than I do but...
I have checked text books, the HTML 4.0 reference on w3.org, assorted
tutorials on the net and tried to check through newsgroup archives and I
still can't find a definitive answer. Most just say that the width is the
'column width' but do not say if that is the width of the content or of the
whole cell including padding.
So if we could ignore any factors like bad style and deprecation, I would
like to know which one is considered correct and ideally see some evidence
for why it is correct because I can't find it.
Graham
I shall try again.
For many years I have been happily and successfully coding tables such that
the WIDTH
specified in a TD is the complete column width including any CELLPADDING.
For example for a 400 pixel wide table with four 100 pixel wide columns and
10 pixel cellpadding...
<TABLE WIDTH="400" BORDER="0" CELLSPACING="0" CELLPADDING="10 ">
<TR>
<TD WIDTH="100">
<TD WIDTH="100">
<TD WIDTH="100">
<TD WIDTH="100">
</TR>
</TABLE>
This is, to me, intuitive and is clearly how many others think it should be
done too judging by tutorials on the net and actual coding used. However
while using GoLive 6.01 (and this is not something I noticed with earlier
versions) I noticed that it considers that the WIDTH only covers the content
and excludes the CELLPADDING. So it would suggest...
<TABLE WIDTH="400" BORDER="0" CELLSPACING="0" CELLPADDING="10 ">
<TR>
<TD WIDTH="80">
<TD WIDTH="80">
<TD WIDTH="80">
<TD WIDTH="80">
</TR>
</TABLE>
....is actually correct and many seem to agree with this too. I'd like to
think Adobe know more about it than I do but...
I have checked text books, the HTML 4.0 reference on w3.org, assorted
tutorials on the net and tried to check through newsgroup archives and I
still can't find a definitive answer. Most just say that the width is the
'column width' but do not say if that is the width of the content or of the
whole cell including padding.
So if we could ignore any factors like bad style and deprecation, I would
like to know which one is considered correct and ideally see some evidence
for why it is correct because I can't find it.
Graham
Comment