Microsoft Office 2000/Visual Basic Programmer's Guide   

Understanding Dynamic Styles

Formatting HTML elements in a Web page is a lot like using styles to format text in a Microsoft Word document. The information about what style should be applied to an element can be contained within the element tag itself, within <STYLE> tags in the document, or within an external style sheet that is included in a Web page by reference. The technology through which styles are applied to the elements in a page is called cascading style sheets. This is an extremely powerful technology you can use to format the appearance of elements in a Web page.

Note   The term "cascading" in cascading style sheets refers to how the cascading style sheets technology resolves conflicts when more than one style tries to apply formatting to the same element at the same time. When multiple styles conflict, the most specific style is applied.

For an example of a page that uses custom style classes defined in the <STYLE> tag of a Web page, see the DivSpanSample.htm and RollOverSample.htm files in the ODETools\V9\Samples\OPG\Samples\CH12 subfolder on the Office 2000 Developer CD-ROM. For a more complete cascading style sheets discussion and reference, see the "Dynamic Styles" and the "CSS Attributes Reference" sections in the C:\Program Files\Microsoft Visual Studio\Common\IDE\IDE98\MSE\1033\Htmlref.chm file.

Note   The path to the Htmlref.chm Help file reflects the language ID folder (1033) for U.S. English language support in Office. The language ID folder below C:\Program Files\Microsoft Visual Studio\Common\IDE\IDE98\MSE differs for each language.