W3C home > Mailing lists > Public > www-style@w3.org > July 1998

Re: CSS2 Syntax: tables

From: James Aylett <dj@insigma.com>
Date: Wed, 8 Jul 1998 13:25:04 +0100 (BST)
To: Ian Samson <IDSamson@beauty.hsrc.ac.za>
cc: www-style@w3.org
Message-ID: <Pine.LNX.3.96.980708131925.9921B-100000@minerva.insigma.com>
On Wed, 8 Jul 1998, Ian Samson wrote:

> From: http://www.w3.org/TR/WD-CSS2/tables.html#h-17.6
> Here is an example:
> TD.blue {border: medium solid blue} TD.thick {border: thick 
> solid red}
> TD.double {border: thick double black} TR {border: medium 
> dotted green}
> with this document:
> <P>
> <TR><TD>1<TD class="blue">2<TD>2
> <TR><TD>4<TD class="thick">5<TD>6
> <TR><TD>7<TD class="double">8<TD>9
> </TABLE>
> Am I missing something here? What is the purpose of defining "TD.blue"
> when a simple ".blue" would suffice? 

I would guess because TD.blue will only affect TD elements with class
blue. Then if you have

.blue { color: blue }

you won't get unexpected effects to do with the border changing on other

> Same goes for the other occurrences. Also, are the double-quotes around
> the attributes entirely necessary; "blue", "thick", "double", when <TD
> CLASS=blue>, <TD CLASS=thick> and <TD CLASS=double> work just as well? 

They aren't necessary. (However it might be worth pointing out that some
syntax-colouring editors don't really understand how literals work. In
any case it's possibly arguable that stylistically it's a little clearer
to quote them.)


  James Aylett, dj@insigma.com                    Insigma Technologies Ltd
  Tel: +44 (0)1285 643100                         Norcote Barn     Norcote
  Fax: +44 (0)1285 643600                         Cirencester      GL7 5RH
Received on Wednesday, 8 July 1998 08:19:43 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:47 UTC