Geoff,
This was sort-of answered a few days ago, but it depends on the degree of
styling needed.
Ideally you could use descendant selectors - depending on your specific
need. With the use of correct table elements like th, thead, tbody, tfoot
etc you can style individual slabs of tables to look different without any
specific classes.
table#sample1 {}
table#sample1 thead {}
table#sample1 tbody {}
table#sample1 tfoot {}
table#sample1 th {}
With these rules you can style specific aspects of a table.
If you need to highlight specific table cells using the most optimal
semantics (no class or ids), you would use adjacent sibling selectors - even
though not supported by IE.
An example where every cell styled differently is here:
http://www.maxdesign.com.au/jobs/css/adjacent2.htm
The previous sample discussed a few days ago is here:
http://www.maxdesign.com.au/jobs/css/adjacent.htm
HTH
Russ
> Hi,
>
> Does anyone have any reference for applying styles to columns in tables in a
> semantically correct way, without having to code class attr into each TD.?
> Can it be done?
>
> Geoff
******************************************************
The discussion list for http://webstandardsgroup.org/
Proud presenters of Web Essentials 04 http://we04.com/
Web standards, accessibility, inspiration, knowledge
To be held in Sydney, September 30 and October 1, 2004
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************