Now the problem is what ever i apply to label also affects the label inside ClassA. Is there any way in which i could explicitly specify that the style should only be applied to the label whose direct parent is ClassA at the same time keeping classb inside classA
The CSS selector "E F" matches any F element which is a descendant of an E element. The selector "E>F" matches any F element which is a child of an E element. (I got this directly from the CSS specification.) Was that what you had in mind?