Monday, February 24, 2014

Controlling the Report Link Presentation

Controlling the presentation of the links on a report is slightly more complex because a link has one or more “states”. The states for a link are Link, Visited, Hover, Active, and Focus and here are their definitions:

State
Description
Link
A link that has not been visited.
Visited
A link that has been visited.
Hover
A link with the mouse pointer hovering over it.
Active
A link that is active. Normally, this is the period of time between the mouse button being clicked and released. 
Focus
A link that has focus.

One method of controlling the link presentation is through CSS classes. For example, adding the two CSS classes below to the style sheet displays all links in black, except hovering over a link displays the link in red.

A
{
   color : Black;
}

A:Hover
{
   color : Red;
}

In HTML a link is represented by the anchor tag <a>. The global style associated with the HTML anchor tag applies to all states where an explicit style is not defined (in this case, Link, Visited, Active, and Focus).

Hint: A link may be in more than one state at a time (i.e. Visited and Hover). Therefore, the Hover state style should appear after the Linked and/or Visit state styles, and the Active state style should appear after the Hover state.  

Many different style attributes can be used to provide feedback to the user. The most common style attributes are: color, background-color, text-decoration, and the font attributes.

No comments:

Post a Comment