Current Page link a unique color

Page: 1


Registered User
3 posts
I have seen from other posts how to change the colors of my links when active, visited, and/or hover using the html editor. However, I would like the color of a link for a page that is currently being visited to be a different color than the other links. Any ideas? Thanks.

Brian

Ambassador
848 posts
Online Now
well that would be the active link would it not? either that or I'm misunderstanding what you mean lol. if you have an example page that might help too, link to your page and tell us what links you mean :) Jo Ann

_____________________________

My New Shop (still in major progress)
http://accessoriesoftheworld.com/shop

My current project for our local Literacy Council
http://northbaldwinliteracycouncil.org

Senior Advisor
3,100 posts
Brian,

It sounds like you want the menu to have a specific color for the active page.

Do you have a URL for the page you are testing?

What type of menu are you using? Bill R.
First Baptist Church
Brighter Day Charities
Roberson Family


Senior Advisor
3,833 posts
If you have text links, like this i.e.:

Menuitem 1 | Menuitem 2 | Menuitem 3 |... etc,

you can style the links differently for each state they are in. If you write into your style sheet something like this for example:

a:link {
color:black;
}

a:visited {
color:gray;
}

a:hover {
color:blue;
}

a:active {
color:purple;
}


The various link states have to be written in this sequence. You can of course use hexadecimals instead of colour names.

You can add other kinds of styling too, like if you want the links to be underlined or not, background colour, font weight etc. Ha en riktig god dag!
Inger, Norway
http://www.nettstedet.net/
http://www.kandoraservice.de/english/enindex.html
http://www.johnsflats.com

Ambassador
665 posts
brian wrote:
I have seen from other posts how to change the colors of my links when active, visited, and/or hover using the html editor. However, I would like the color of a link for a page that is currently being visited to be a different color than the other links. Any ideas? Thanks.


You need a unique ID for the body tags of each of your pages. For instance you might have these three pages:

Home
About
Contact

So, for the Home page you could have <body id="home">
For About, <body id="about">
For Contact, <body id="contact">

Then your menu links need unique id's as well.

For the Home link, <a id="ahome" href="...
For the About link, <a id="aabout" href="...
For the Conact link, <a id="acontact" href="...

Then the styling would look something like this:

#home #ahome:link, #about #aabout:link, #contact #acontact:link {
color:#FFFF00;
}

Notice, if I got all of this right, this color styling will only be applied to the Home link when the home page is being viewed, to the About link when the about page is being viewed, and to the Contact link when the contact page is being viewed.





Ambassador
848 posts
Online Now
So in effect that makes a unique link color for like current menu link? very sweet ty again Cary, I didn't realize you could do that either. Jo Ann

_____________________________

My New Shop (still in major progress)
http://accessoriesoftheworld.com/shop

My current project for our local Literacy Council
http://northbaldwinliteracycouncil.org

Ambassador
665 posts
Yep, no problem. I did find in another thread that Brian wants to do this with VSD. This method can't be used with VSD.

Registered User
68 posts
the stlye sheets are probably the best way to go, you can change link colors on the fly with out the use of set link style in your css.

<a href="file.html">

<font color="#ff0000">Click Here</font>

</a> http://www.webdsign.biz

Registered User
3 posts
Thank you everybody for the responses. I got some help from coffee cup support on this, and am going to try it when I get my website completed (the html code has to be altered, and I can only do that after the entire website is done). I'll let you know how it goes.

Please Login to Reply

Download Our Software:

... and don't forget about our Free Software