How does css inheritance work exactly?

Rambo

New Member
I want to create different button styles, which should eg only differ in the color. So I'd thought I make a base css class for the button, and inherit them and just override the color (at least that would be my approach from the Java perspective...).\[code\].myButton { padding:... width:... background: white;}.myButton-ok { background: green;}.myButton-warn { background: orange;}\[/code\]But how can I make these classes extend the \[code\].myButton\[/code\] class, so that I only have to apply eg \[code\].myButton-ok\[/code\] and all other base button styles are maintained?
 
Top