Using Cascading Style Sheets with Visual Web JavaServer Faces

See Also

A cascading style sheet contains a list of rules that specify the appearance of all HTML pages that reference it. Settings determined by a style sheet include fonts and colors. The IDE creates a default style sheet under the project-name > Web Pages > resources node, stylesheet.css, that you can edit directly. In addition, there are style sheets in the theme files that apply to most components.

To add or change CSS rules to be used by the project, you can edit the default style sheet with the CSS Editor, or you can add your own stylesheet to the project and reference it instead. In addition, you can override settings in the style sheet by setting inline styles for components, as described in Setting CSS Styles for a Component.

To set the style sheet for a page:

  1. In the click the page.
  2. In the Properties window, click the ellipsis button (...) next to Style Sheet.
  3. Enter the style sheet's file name and location and click OK.

    For example, if you have added a style sheet named mystylesheet.css to the project, you would click the URL tab and enter /resources/mystylesheet.css.

To edit a style sheet located in the resources directory:

  1. In the open project-name > Web Pages > resources.
  2. Right-click stylesheet.css and choose Open.
  3. In the CSS Editor, edit the style sheet.
  4. When you are finished, save your work by choosing File > Save.
See Also
About Components
About Themes
Setting Component Properties
Component Tasks: Quick Reference
 
For an introduction to CSS, see the following web page:
For an online reference to CSS, see the following web page:

Legal Notices