On Mon, 28 Jul 2008 15:02:52 -0400, Michael B Allen wrote: > When I generate a table, occasionally I'd like to style it in column, row > and/or cell > specific ways. Rather than emit application specific style information on a > case-by- > case basis, can someone recommend a method or best practices for generic > table styling? > I'm a programmer, not a web designer. I'd like to separate my peas and > carrots a little. > > For example, lets say I have a grid of products and I want to have borders > only on the > inner cells (like a tic-tac-toe board). > > Or perhaps I want to shade every other row or only one column in a report. > > My first thought is to use multi-class attributes like: > > <td class="r12 c3 even">data</td> > > Would this work and would it be portable (e.g. do multi-class attributes work > in IE 6)? > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Taking these in reverse order: - Would multi-class attributes work in IE 6? Well, yes and no. You can certainly add more than one class to an element and have any one of them recognized. But if you specify a chain of them in a selector, IE 6 only applies the rule to the last one, IIRC. - You can apply any of four properties to a table COL, namely background, width, border, and visibility. I think IE allows some more, but that's not standard behavior. - For shading alternate rows, google "css striped tables" or "zebra tables." Lots of solutions out there, mostly using a touch of JavaScript. - I'd classify CSS as closer to programming than designing. You should get along fine once you have the hang of it. Good luck. Cordially, David -- ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/