• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Defining Cascading Style Sheets > Defining Link Appearances

Defining Link Appearances

In HTML, you can define different colors for the various link states in a page: links, visited links, and active links. If you simply redefined the <a> (anchor) tag using CSS, you could affect all the link states as a group but could not vary them individually. You’ll use a special subgroup of the third type of styles, CSS Selectors, called pseudo-class selectors. There are pseudo-class selectors for link, visited link, and active link. In addition, there is a fourth pseudo-class selector for the <a> tag called hover; it creates a rollover effect on the link.

Creating a Null Link

First, you need a link to work with, so add a link to your Web page by selecting some text. You create a link in the Link field of the Property inspector, as shown in Figure 5.15. Instead of linking to another Web page or a Web site, create a null link—a link that doesn’t go anywhere but is useful for capturing user interactions with the Web page without loading a different Web page. You’ll use null links throughout this book to capture user clicks, mouseovers, and other events. Create a null link by entering javascript:; in the Link text box (don’t forget the colon and the semicolon).


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint