Understanding and Customizing the Dynamic HTML Standard Edition Template

prevnext

Using your own CSS file


Instead of modifying the CSS file provided with the Dynamic HTML Standard Edition template, you can using your own CSS file. To make this work, you need to make several changes to your project. You'll need to:

Adding the CSS file

To add the CSS file to your project, add it as a support file by following these steps:

  1. Select Project » Add Files to display the Add Files dialog box.

  1. Click the Browse button next to the Support File or Directory radio button at the top of the window. This displays a directory navigation box.
  2. Locate the CSS file on your system and select it, then click Add.
  3. At the bottom of the Add Files dialog box, click Done.
The new file is copied to your project's support directory. When you regenerate the project, it will be copied to the output directory.
  1. To avoid confusion, consider deleting the old CSS file from the support directory. Just select it in the Project window, then click Delete.

Next, you need to modify the page templates to reference the new CSS file.

Modifying the ASP files

Each page template in the Dynamic HTML Standard Edition template contains a line of code that references the CSS file. You need to change this to reference your new CSS file. Follow these steps:

  1. For each page template that you use in your project (typically TOC, Index, and Normal), open the ASP file and locate this line of code:
 <link rel="StyleSheet" href="standard.css" type="text/css" 
media="screen">
  1. Change the reference to standard.css to use the new CSS file name.

Save your changes to each page template file.Modifying the style definitions

By default, each paragraph and character style definition inserts a class tag that corresponds to the name of the style itself. This is done using the BPBlockAttributes building block (for paragraphs) and the BPInlineAttributes building block (for characters). If your new CSS file uses the same style names as the default CSS style, you're ready to go. But if your new CSS file uses different style names, you need to modify the style definitions in Publisher to use those style names. For example, if the new CSS file contains a style definition for "MainSection," which should be used for headings mapped to the Publisher Heading1 style, you have two choices:

Here's how to modify the Heading1 style definition. The original Heading1 style definition looks like this (slightly simplified):

 <H1 $BPBlockAttributes;>
 $DATA;
 </H1>

Replace the BPBlockAttributes building block, so that your style looks like this:

 <H1 class="MainSection">
 $DATA;
 </H1>
WARNING: Do not change the BPBlockAttributes building block definition; it's used by many other paragraph styles.

prevnext



Quadralay Corporation
http://www.webworks.com
Voice: (512) 719-3399
Fax: (512) 719-3606
sales@webworks.com