...
Each definition and definition class can have one or many properties associated with it. Properties specified within the style definition are inherited(cascaded) to any style definition class under it. Study the example below
Code Block |
---|
label { color: #993300#ffffff; border-style: solid; font: bold 10pt Verdana; } label.mytext { color: red; border-style: solid; vertical-align: middle; font: bold italic 10pt Verdana; border-width: 1px 1px 1px 1px; border-color: #111111 #111111 #111111 #111111; margin: 2px 2px 2px 2px; } |
label
{ color: #993300; border-style: solid; font: bold 10pt Verdana;
}
label.mytext
{ color: red; border-style: solid; vertical-align: middle; font: bold italic 10pt Verdana; border-width: 1px 1px 1px 1px; border-color: #111111 #111111 #111111 #111111; margin: 2px 2px 2px 2px;
}
...
...
Notice that the border style and font are not modified in the mytext class. This means if a label were specified to use mytext for its style, it would be bold, 10pt, Verdana because that is what is specified in the parent style definition. The color would be red (not black) because that was overridden by the mytext definition class.
In order to use a style sheet, the style sheet must be applied to a form. Solutions do not have a style sheet applied, only forms. Styles for the elements on a form are dependent on the style sheet applied to the form.
...
...
A style can be applied to a form in one of two ways.