RE: [WSG] Understanding inheritance (well, trying to)

2005-07-24 Thread John Yip
25, 2005 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hope Stewart Sent: Saturday, 23 July 2005 5:41 PM To: Web Standards Group Subject: [WSG] Understanding inheritance (well, trying to) There's something about inheritance that I don't understand. Say

Re: [WSG] Understanding inheritance (well, trying to)

2005-07-24 Thread matt andrews
inheritance (well, trying to) There's something about inheritance that I don't understand. Say in my style sheet I have: body { color: black } #content {} #hilite p { color: red } If I have three paragraphs in the div #hilite and I want the text of one of them to be black instead

RE: [WSG] Understanding inheritance (well, trying to)

2005-07-24 Thread John Yip
] Understanding inheritance (well, trying to) There's something about inheritance that I don't understand. Say in my style sheet I have: body { color: black } #content {} #hilite p { color: red } If I have three paragraphs in the div #hilite and I want the text of one of them to be black

[WSG] Understanding inheritance (well, trying to)

2005-07-23 Thread Hope Stewart
There's something about inheritance that I don't understand. Say in my style sheet I have: body { color: black } #content {} #hilite p { color: red } If I have three paragraphs in the div #hilite and I want the text of one of them to be black instead of red, I define this class for that

Re: [WSG] Understanding inheritance (well, trying to)

2005-07-23 Thread russ - maxdesign
Hope, This second rule of yours is not being applied as it has less weight than the first rule. This is due to specificity. Specificity is used to determine which rules will be applied to elements if there are conflicts - such as different color properties being applied to the p element. Your

Re: [WSG] Understanding inheritance (well, trying to)

2005-07-23 Thread Joe Huggins
Hello, This has to do with specificity. The use of the id in #hilite p is a more specific rule than the class in .normal. When you re-write it to #hilite .normal that rule now becomes more specific. An id is more specific than a class. For more on this:

Re: [WSG] Understanding inheritance (well, trying to)

2005-07-23 Thread Hope Stewart
Thanks Russ Joe. It all makes sense now! I had never come across the specificity rules before. (Then again, a year ago I had never heard of web standards.) This is a rather handy thing to know. Cheers, Hope Stewart ** The discussion list for