/    Sign up×
Community /Pin to ProfileBookmark

How can I change the Font color in a menu for multiple pages?

I am working on a web site that has a lot of menu items…to make it easier for me I want a script to change the font color for a selected menu item (so users know where they are in the page) for example:

(Menu…font is dark blue)

Export

Menu Item 1

Menu Item 2

Import

When Menu Item 1 is clicked and you are at menuitem1.shtml, I would like the font to be light blue.

The left nav menus are include files if that makes a difference. I need a script to change these font colors so I dont have to write 35 more include files with the color change.

Please, any thoughts would be greatly appreciated.

Thank You!

John

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@TheBearMayNov 23.2005 — It would seem to me that that easiest way to do this would be by using CSS and assigning the appropriate class to each level.

For example:
<i>
</i>&lt;style type="text/css"&gt;
.mainMenu {
color:#0000a0;
....
}
.subMenu {
color:#6262ff;
....
}
&lt;/style&gt;
...
&lt;ul class="mainMenu"&gt;
&lt;li&gt;Menu Item 1&lt;/li&gt;
....
Copy linkTweet thisAlerts:
@JWentworthauthorNov 23.2005 — Ok i'll start there...I'm REALLY new to this...what do those "...." mean in your reply?
Copy linkTweet thisAlerts:
@deejaybetNov 23.2005 — Ok i'll start there...I'm REALLY new to this...what do those "...." mean in your reply?[/QUOTE]

those "...." are not needed when you use them unless you want to add extra CSS scripting to it... since your relatively new at it i suggest you check out tutorials for CSS scripting at the following site

http://www.w3schools.com/css/

go here for tutorials on many other web tutorials

http://www.w3schools.com/
×

Success!

Help @JWentworth spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...