After you create or import a style sheet, you can create new classes of a parent tag (or selector). However, you cannot create new parent tags. For example, <p> is a parent tag, as are <h1>, <a>, and <span>. You can create a class under any of those parent tags to give you more variety and flexibility when using styles in your content (e.g., p.Tip, p.Note, h1.IndexHeading). But you cannot use the Stylesheet Editor to create a new parent tag called, say, "MyTag" at the same level as the other parent tags; instead, it must be created as a style class under one of the existing parent tags.
There are numerous ways to create new style classes.
How to create a new style class from the Stylesheet Editor
Open the topic style sheet from the Content Explorer.
The Stylesheet Editor opens.
In the upper-left corner of the Stylesheet Editor, make sure the Show Styles field
is set to Show All Styles.
In the editor, find and click on a tag (such as <p> or <li>).
Your new style will start out with the same properties as the tag that you choose. For example, if you are creating a style class for text to be used as a note of caution for your readers, you might decide that the <p> (paragraph) tag is most appropriate.
In the local toolbar, click
.
The New Style dialog opens.
Click OK.
The new style class is added under the tag you selected.
to save your work.How to create a new style class from the Styles window pane
Place your cursor on the topic content that you want to use as a foundation for your new style.
example
If you place your cursor on content that currently has the <p> tag applied to it, the new style will start out with the same property values as the <p> tag.
Select View>Style Window or press F12 on your keyboard.
The Styles window pane opens.
Click the Create Style button.
The Create Style dialog opens.
Click OK.
to save your work.How to create a new style class from the topic content
at the bottom of the editor to display them to the left of the topic content.Hover over the appropriate tag bar next to the topic content that you want to use as a foundation for your new style. When the cursor becomes a hand
, click the bar.
example
If you click the <li> tag bar next to content in the topic, the new style will start out with the same property values as the <li> tag.
In the popup menu, select Style Class>Create Style Class.
The Create Style dialog opens.
Click OK.
to save your work.Note: You can also import existing styles from another style sheet.
After you create a new style class, you can edit its properties (e.g., font, background, border).