Share via


Style and Behavior of Links

To guarantee that links in your Help topics will function correctly, you must associate the topics with the cascading style sheet file, HxLink.css. HxLink.css provides the default behavior for links that are managed by the Help system. HxLink.css is stored in HxRuntime.hxs, which is installed with the Help run-time components.

To associate HxLink.css with a topic, add the following markup to the <head> tag of the source file for the topic:

<link rel="stylesheet" type="text/css"
href="ms-help://Hx/HxRuntime/HxLink.css">

Note

HxLink.css is required for Help links (<MSHelp:link> links) to function correctly in the compiled Help file. Standard HTML-based links ("<a href>" links) are not affected by this style sheet.

You can also use your own .css file if you want to extend or override the link behavior provided by HxLink.css. To do so, add a link to your own style sheet after the link to HxLink.css, as in the following example:

<link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" />
<link rel="stylesheet" type="text/css" href="../local/customstylesheet.css">
</link>

In your own .css file, you can use standard style mechanisms to redefine the look and feel of links. This example demonstrates how to apply alternate styles to a link.

MSHelp\:link { text-decoration: underline;
               color:blue;
               hoverColor:green;
               }

HxRuntime.hxs, which contains HxLink.css and other related files, is installed and registered on your computer in one of two ways:

  • When you install Microsoft Help Workshop.

  • When you install a product that includes the Microsoft Help 2.x runtime, for example, Visual Studio.

HxRuntime.hxs is registered in the ms-help://hx namespace.

When HxRuntime.hxs is installed, you can view HxLink.css, HxLink.htc, and other files by clicking the the following links:

HxLink.css

HxLink.htc

HxkTable.htc

HxLinkTable.htc

HxLinkMenu.htc

HxLinkMenuItem.htc

You can also save these files elsewhere on your computer by right-clicking one of the links and then clicking Save Target As.

See Also

Other Resources

Getting Started with Help Content and Integration