table.mytable td
{text-align: expression(this.previousSibling==null?'center':'left');}
Another way I've found is to use the childNodes of the element's parentNode, which is useful for targeting multiple columns in a table (yes, it's a table, but it's being used to display real tabular data in the case I'm working on), and when the col tag isn't enough to style the columns:
table.mytable td
{text-align: expression(this==this.parentNode.childNodes[0]?'center':'left');}
No comments:
Post a Comment