Previous Topic: Support for Themes and SkinsNext Topic: Image Files


CSS Files

A theme may also include Cascading Style Sheet (CSS) files. When you add a [set the File Name variable].css file for a theme in the <themename> directory, the style sheet is applied automatically as part of the theme.

The CSS file consists of valid style sheet statements that specify the Type Selector, or the ID Selector for the windows or controls in a CA Gen ASP.NET application.

In CA Gen ASP.NET applications, the appearance settings of a control from the Navigation Diagram, dynamic attributes, Dot Notation statements, or skin properties are saved as inline style attributes in each HTML tag. Hence, all controls in CA Gen ASP.NET applications contain inline style attributes.

The style attributes in a CSS file can only modify the attributes that are not specified in the inline style attribute because the inline style attributes have a higher precedence over the style settings from a CSS file,

For example, the following statements in a CSS file define the background color of a window, the color of the field prompt, and the controls with ID, Field1:

Body { background-color:#ffc0cb; }
Label   {  color: #00ff00;  background-color: #32cd32; }
#Field1 { color:#ff0000; background-color: ffc0cb;}

If you add this CSS file in the <themename> directory, the following appearance settings apply for the windows, controls, and field prompts: