On Sat, Feb 25, 2012 at 4:28 AM, Melinda Odom <i...@designhosting.biz> wrote:
> Hi,
>
> I have the middle links on this page setup and working when you click on one 
> of the links and it goes to that page that link stays a changed color.
> http://www.designhosting.biz/design.html
>
> I am trying to do the same thing for the top menu but it doesn't work. I even 
> tried adding the id and class from the middle links to the top links and it 
> still will not work.
>
> Any help is greatly appreciated.

In your middle links (inside of div#subPageLinks) it looks like your "default"
color is defined for the links that have the class subLinks and the active link
is the one without the class.  That seems a little backwards to me, but hey...
whatever works :)

To do your main navigation the same way, define the color for the current page
in your CSS.  It should be something like

  div#nav a { color: #00ccff; }.

Then give the links in your navigation bar (div#nav) a common class and set a
color on that class as the "default" color.  If the class was mainLinks, then it
might be something like

  div#nav a.mainLinks { color: #999999; }.

Finally, in each page remove the class from the link for that page's link.
For example, in design.html, the Design link wouldn't have the class mainLinks.

A more conventional way to do it would be as Tom Livingston suggested.  Use a
class just for the active page.  I like to use the class "active" for this.  In
each page, add the "active" class to the active page's link, then in your
stylesheet you could add the highlight color:

  div#nav a.active { color: #00ccff; }

This is the way I actually recommend doing it and you should probably do it this
way for your middle links, too.

--
Vince Aggrippino
Ghodmode Development
http://www.ghodmode.com


> Thank you!
>
> Best Regards,
> Melinda L. Odom
> 1605 Dechard Street
> Van Buren, Arkansas 72956
> Cell: 479-226-6040 CST
> Design Hosting, Inc.
> i...@designhosting.biz
> Join Me on Twitter
> Amazon Wish List
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
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