This tutorial is courtesy of CSS The Missing Manual by David McFarland:

What you are trying to do is create a "You Are Here" link.

Here's how!

First assign an id to the body tag of each of your pages.  For
example, your "Features" page would be:

<body id="feature">

On your links page you would have:

<body id="links">

Now that you've id'd your pages, you will also need to id your navigation links.

so the html for your home page link would say:

<a href="/home/" id="homePage">Home</a>

for your links page you would make it something like:

<a href="/links/" id="linkPage">Links</a>

Finally, in CSS you create a style for each page's "you are here" link.

body#links a#linkPage, body#home a#homePage {however you want to
highlight that particular link in your nav}

Mr McFarland says: "Yes, that's a lot of CSS. But your set-up work
here has a big payoff. This style now applies to every link in the nav
bar, but only under certain conditions, which is exactly how you want
it to behave.  when you change the id attribute of the <body> tag to
"links", the button to the "Links" gets highlighted instead of the
button for "Home."

Good luck!

-Don
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to