FP2000: How to Alter the Formatting of Hyperlinks Using Styles

ID: Q233104


The information in this article applies to:
  • Microsoft FrontPage 2000


SUMMARY

This article describes ways in which you can modify the appearance of hyperlinks beyond the methods available through the FrontPage 2000 Style dialog box.


MORE INFORMATION

Removing the underline

The Font dialog box (on the Format menu) offers the ability to define Underline, Strikethrough, Overline, Blink, Small caps, All caps, Capitalize, and Hidden text styles. If none of these boxes is selected, no font attributes are written to the style definition. One of the more popular styles is to display hyperlinks without any underline. To achieve this effect, you must edit the style code directly.

To achieve this effect in FrontPage, find the file that contains the style syntax. If the style was applied through the Style dialog box (on the Format menu), open the page to which the style was applied. If the style was applied through the Style Sheet Links command, open the cascading style sheets file (or files) that the page is linked to.
  1. Find the style syntax for the a tag. It looks similar to the following:
    
    <style>
    <!--
    a   {  }
    -->
    </style> 


  2. Within the curly braces, type
    
    text-decoration:none 


  3. Your completed style code will look similar to the following:
    
    <style>
    <!--
    a   { text-decoration:none  }
    -->
    </style> 


If the hyperlink style was defined by clicking the Style button in the Create Hyperlink dialog box (on the Insert menu, click Hyperlink), follow these steps:
  1. Open the page containing the hyperlink.


  2. Select the link and then switch to HTML view.


  3. Edit the selected A tag so that its style attribute looks like the following:
    
    style="text-decoration: none" 


The following is an example of a complete style definition as an attribute of the hyperlink tag.

<a href="http://localhost" style="text-decoration: none">inline style</a> 

Specifying different formatting for unvisited, visited, and active links

The HTML tag that forms hyperlinks has some pseudo-classes defined by the cascading style sheets specification, yet pseudo-classes are not displayed in the list of all HTML tags drawn by FrontPage 2000. This section describes how you can assign different formatting to a hyperlink, whether it is unvisited, visited, or active.
  1. On the Format menu, click Style.


  2. From the list in the lower left corner, select All HTML tags, select the A tag, and click Modify.


  3. As a name for the style, type a:link for unvisited links, and then apply the various formatting options available in the Modify Style dialog box.


  4. To specify styles for active and visited links, repeat these steps 1-3, but in step 3, name the style a:active or a:visited.


REFERENCES

For more information about cascading style sheets and anchor-pseudo-classes, please see the following Web sites:

http://www.w3.org/TR/REC-CSS1
http://www.w3.org/TR/REC-CSS2/
http://www.w3.org/TR/REC-CSS1#anchor-pseudo-classes

Additional query words: front page fpfaq

Keywords : kbdta
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: July 1, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.