Current Link Decoration?

R

RoadKill

You can do text decoration for a link hovered over, but can you do one that
is for one currently being visited? This is what i have right now.

a {color: #660000;}
a:link {text-decoration: underline}
a:visited {text-decoration: underline}
a:hover {text-decoration: underline}
 
T

Trevor Lawrence

RoadKill said:
You can do text decoration for a link hovered over, but can you do one
that
is for one currently being visited? This is what i have right now.

a {color: #660000;}
a:link {text-decoration: underline}
a:visited {text-decoration: underline}
a:hover {text-decoration: underline}

Use a:active

Examples are given in http://www.w3schools.com/CSS/css_pseudo_classes.asp
a:link {color: #FF0000} /* unvisited link */
a:visited {color: #00FF00} /* visited link */
a:hover {color: #FF00FF} /* mouse over link */
a:active {color: #0000FF} /* selected link */

Note that the order is important
 
R

RoadKill

But doesn't active just cover it until the page actually loads? That seems to
be the case on our intranet site anyway.
 
S

Stefan B Rusynko

Correct
- active is only the one with a mousedown event currently in effect

For any currently visited page style (different when that page is loaded)
- you will need a client side or server side script (not just a CSS style) to determine which page you are on
Search for breadcrumb navigation scripts (they usually include a current page node)




| But doesn't active just cover it until the page actually loads? That seems to
| be the case on our intranet site anyway.
|
| "Trevor Lawrence" wrote:
|
| >
| > | > > You can do text decoration for a link hovered over, but can you do one
| > > that
| > > is for one currently being visited? This is what i have right now.
| > >
| > > a {color: #660000;}
| > > a:link {text-decoration: underline}
| > > a:visited {text-decoration: underline}
| > > a:hover {text-decoration: underline}
| >
| > Use a:active
| >
| > Examples are given in http://www.w3schools.com/CSS/css_pseudo_classes.asp
| > a:link {color: #FF0000} /* unvisited link */
| > a:visited {color: #00FF00} /* visited link */
| > a:hover {color: #FF00FF} /* mouse over link */
| > a:active {color: #0000FF} /* selected link */
| >
| > Note that the order is important
| > --
| > Trevor Lawrence
| > Canberra
| > Microsoft MVP - FrontPage
| > MVP Web Site http://trevorl.mvps.org
| >
| >
| >
 
R

RoadKill

That is what I was afraid of. One group of our company uses IDs for the links
and puts a style linked to it in each page. For a larger website with a
hundred or so pages, this doesn't sound like fun.

Thanks for your advice, I'll see what is out there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top