Chris Ovenden wrote:
> I can't agree with you, Barney. If you really want to use an ID, just attach
> it to the first cell in the column of stock prices. (But why, though?
> Perhaps we should make the class name 'stock_price', and apply it to every
> cell that - guess what? - contains a stock price.) If, elsewhere, you have
> another column, say of share prices, whose presentational attributes should
> be the same, then write:
>
> td.stock_price, td.share_price { whatever }
So you would use the class as a unique object descriptor? Can't say that
aspect really bothers me that much, none of the important distinctions
between id and class come into this.
You object to the single class because it would have to bear a name
referencing its style information, I presume? I personally think it
would make more sense from the markup. But I'd like to hear why this
isn't such a hot idea, because I know it isn't.
For the sake of clarity and your own management it's often best to keep
class somehow referring to what it is about the elements that would make
you want to style them differently in the first place, but in this case
that doesn't really apply. I've been known to use empty <div
class="clearboth"> objects, <span class="nobreak"> and more, that are
honestly denoting presentational rules that aren't there to affect all
objects with such and such in common, and are merely 100% presentation
born of specific context. I think it can be excused in these cases, but
mainly it's because I can't take any alternative too seriously.
Regards,
Barney
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/