To address the subject line before getting to the actual problem described: No. HTML classes (which CSS class selectors select) are not classes in the sense used in traditional OO programming. They are classes in the wider sense.
4: a collection of things sharing a common attribute; "there are two classes of detergents" [syn: category, family] -- Wordnet So throw all thought about OO programming concepts away when thinking about classes in terms of HTML and CSS. 2009/7/23 Chris Price <chris.pr...@choctaw.co.uk>: > So I tried class="comment wide" but that doesn't work because .wide is > not set explicitly, only within another style. The alternative is to > have a narrowComment class and a wideComment class because a wide class > with a set width means it can only apply to a 'comment' element. > It would be simpler if I were dealing with IDs because I could style my > #comment and add a .wide class and then specify the style for #comment > .wide in my style sheet. You can combine multiple classes selectors too: .comment.wide { } But support is lacking in IE6. -- David Dorward <http://dorward.me.uk><http://blog.dorward.me.uk> ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] 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/