On 1/23/07, Barney Carroll <[EMAIL PROTECTED]> wrote:
>
>
>
> > which leaves...
> >
> > 2) which as far as I see it is best practise. It gives a clear mening to
> the
> > cell, however it may end up getting displayed. What is your objection to
> > writing td.stock_price_col { width:77px } ?
>
> This is a tough one - we're bumping into the monolith issue of semantic
> CSS again. stock_price_col sounds like an id property to me, seeing as
> it denotes a specific object - if you wanted to use the same rule on
> another object, the name will no longer hold, you'd be wanting another
> class - and then it becomes clear that thoses classes should be ids.
>
> But you don't want ids for stock prices, you want a class which is
> 'fixed width column', which is not primarily associated with stock
> prices, but with columns that are better off with a specific width
> attribute. The problem is that, according to the rules of semantic CSS,
> you can't name a class or id based on the rules you will use them to
> apply - it has to be unrelated to the presentation they will be used
> for, and more indicative of the the structural semantic reason you're
> giving the style. As it is, their probably is none. My advice is
> .fixedwidthcolumn, even though it breaks those rules. It still makes far
> more sense.


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 }

-- 
Chris Ovenden

http://thepeer.blogspot.com
"Imagine all the people / Sharing all the world"
______________________________________________________________________
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/

Reply via email to