Re: Validation Problem

by Tamara Abbey <tamara(at)abbeyink.com>

 Date:  Tue, 20 Mar 2001 21:17:48 -0600
 To:  jim barchuk <jb(at)jbarchuk.com>,
<hwg-basics(at)hwg.org>
 References:  default
  todo: View Thread, Original
At 08:34 PM 3/20/01 -0500, jim barchuk wrote:
>Ignore the error. Validation is a useful and important tool up to a point
>but it is not be all and end all of HTML authoring. HTML is engineering,
>not science. Engineering is compromise. Compromise means accept reasonable
>errors and limitations. You are already limited by browsers that don't
>recognise BORDERCOLOR. The purpose of HTML is content. A 'wrong' border
>color is not an error in that it will not cause the content to fail, the
>browser just ignores it. The user with the browser that does not recognise
>BORDERCOLOR has no clue it might look different under another browser
>because he has -never- seen a different border color other than his
>browser default. The user with the browser that recognises BORDERCOLOR
>will see it just fine.

Well, Jim, I'm going to philosophically disagree with you on this one. You 
are right -- you have to know the rules before you can break them.

Now, there's more than one way to achieve an end and bordercolor is just 
one of the ends people want to achieve. Technically, you are right -- it 
will work. In IE. It will not validate. Does it matter? I think so, but 
that's just me.

So, for the sake of argument (it's late and I'm in a mood), why not use 
CSS?? Not only will it work, it will validate.

And, to go one step further, there /is/ a way to achieve a consistent 
border color in tables.

(source, hwg member Rudy, but posted to a different list -- Rudy, I hope 
you don't mind?)
<quote>
here's a nifty hack that will work in all
browsers that understand table background colours (html 2? netscape 4
definitely) but will only validate transitional, not strict, as i think
bgcolor is deprecated --
<table bgcolor="#990000"
border="0" cellpadding="0" cellspacing="0">
<tr><td><table
border="0" cellpadding="9" cellspacing="1">
<tr bgcolor="#FFFFCC"><th>foo</th></tr>
<tr bgcolor="#CCFFFF"><td>bar</td></tr>
</table></td></tr>
</table>

</quote>

And, if you want to improve your chances of validating, then make a CSS 
class for each table, one in the border color and the other in the center 
color, and then repeat the class id for the cell the table is nested in.

FWIW,
<tamara />
(I love CSS)

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA