KB Version:

Page Navigation

Related Links

Learning Levels

Most Read

Announcements RSS Feed of Announcements

CSS

Digest

The term CSS refers to a Cascading Style Sheet, which is the standard method for styling the appearance of a website. Cascading Style Sheets effectively separate the code needed to create the look and feel of a website from the actual XHTML tags that define the structure of its pages. When designing a website, it is important to separate the concepts of presentation and structure, because a site can quickly become very hard to maintain when a designer mistakenly combines them together. Because CSS properties reside inside an independent file, multiple pages within a single website can simply link to it to receive the style definitions that dictate the appearance and positions of elements on a page. When a website designer uses this modular approach to site development, it is easy to change the properties of all pages within a site by making a simple edit to the single CSS file to which all of the pages link.

Concept

Using CSS in Cascade

There are several ways to use CSS in Cascade. The most common ways include:

  • Include the CSS file(s) in the template. This is the standard practice for web sites.

  • Include a global CSS file and available classes (styles) in Tools -> Preferences -> Content. The global styles and CSS are included by default in the WYSIWYG for all users unless a more local CSS file and classes exist.

  • Include a local CSS file and available classes at the Target-level. This allows for specific CSS classes across different sites and pages.

  • Include a local CSS file and available classes at the Group-level. This allows for specific CSS classes based on the default group of the user. The Group-level classes and CSS override the Target and global levels.

  • CSS in the XSLT. CSS classes can be applied programmatically in the XSL to style the data definition and index block XML in whatever way desired.

Please note it may be necessary to extend or provide an alternate CSS file for use in Cascade that is different from what is used on your live site. This occurs when more precise selectors are used in the CSS (especially the use of ids like div#content). For the classes made available in Cascade’s word processor, standard classes that are not dependent on being positioned according to other elements should be used.  We recommend a standard naming convention like styles.css and styles-cms.css to differentiate the two.

Related Links