function activeTab(now){
for (i=0;i<names.length;i++){
//change styles of things...you can use lots of css in here to change the properties of things...
document.getElementById(names[i]).style.background='#B8B8B8';
}
//activeTab here...
document.getElementById(now).style.background='#ececec';
}

The javascript did work, but there's one thing, I just want to change the color of the link, and if I change style.background into style.color, it doesn't change... I think this is weird, or else I'm making a big mistake?

function activeTab(now){
for (i=0;i<names.length;i++){
//change styles of things...you can use lots of css in here to change the properties of things...
document.getElementById(names[i]).style.color='white';
}
//activeTab here...
document.getElementById(now).style.color='#894A20';
}
</script>

What could be simpler? The link associated with a given page gets a new color. If you're using some type of include with a menu file, this is ideal. If you're coding the menu into each page, do as Akh suggested. Use simple text in place of an <a> element (why confuse the visitor with a self referrent link?) with a class designator;

Code:

html--
<li class="current">page 1</li>
css--
.current {color: red;}

In one method, the menu is common to all pages and the style is individualized. In the other the style is common and the menu is varied.

The simpler you keep it, the easier to maintain.

cheers,

gary

Last edited by kk5st; December 19th, 2003 at 10:25 PM.

There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

I tried those, but they did not work actually, because I only use one index page. I work with include (php). The visitor should just know where he's is at that moment, as the text of the link for that page is in another color, but you can't do this by putting it on every page itself... I just include the other pages, so they are only text-based, and there is just only one menu of course...