Re: CSS2 Syntax: tables

On Wed, 8 Jul 1998, Ian Samson wrote:

> From:
> Here is an example:
> {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 ""
> when a simple ".blue" would suffice? 

I would guess because 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,                    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