28.2.2 Specifying link class

To give some of the links in your document an appearance different from that produced by the “a:” class properties specified in CSS or the default browser settings, you can name and define other CSS classes, and apply them selectively to the links in your document.

For example, suppose you want certain links to be red except when the mouse hovers over them, when they should change to green underlined. In CSS you might define link class traffic:

a.traffic:link,a.traffic:visited,a.traffic:active {color: #ff0000;}
a.traffic:hover {color: #00ff00; text-decoration: underlined;}

You can apply such a class to selected links via PI marker in DITA XML, or via paragraph-format assignment in the DITA2Go configuration file. To change just one or two links, probably a PI marker is easier. To change many links, you might want to use a special @outputclass for the paragraph format for the text where the links occur.

In this section:

§28.2.2.1 Assigning a link class with a PI marker

§28.2.2.2 Assigning a link class with a paragraph format

Previous Topic:  28.2.1 Specifying link colors

Next Topic:  28.2.2.1 Assigning a link class with a PI marker

Parent Topic:  28.2 Specifying link appearance

Sibling Topics:

28.2.1 Specifying link colors

28.2.3 Assigning link attributes with PI markers

28.2.4 Specifying link properties with macros

28.2.5 Replacing problem characters in links

28.2.6 Forcing link text to lowercase

Table of ContentsIndex