Category Menu Active Link
6 posts by 3 authors in: Forums > CMS Builder
Last Post: March 30, 2009 (RSS)
By chassa2556 - March 27, 2009
Is there a way of styling a category menu breadcrumb so that when a link is active it changes colour or becomes bold? I've tried the :active in CSS but it doesn't seem to want to play.
Re: [chassa2556] Category Menu Active Link
By Perchpole - March 28, 2009
Remember to put your classes in the following order or they may fail to work as expected...
a:link {color: #FF0000}
a:visited {color: #00FF00}
a:hover {color: #FF00FF}
a:active {color: #0000FF}
Also, bear in mind that the "active" style is only evident on the page on which it was "activated". Typically this is only ever apparent when you mouse-down on the link.
To make the link on the target page look "different" takes a bit of creativity!
:0)
Perch
Re: [Perchpole] Category Menu Active Link
By gkornbluth - March 28, 2009
You might also want to put a style link on the page itself to make sure that there's nothing in your external style sheets that's conflicting. Like:
<style type="text/css">
a.breadcrumb:link { font-family:Verdana; color: #ffffff; font-size: 0.68em; font-weight: bold; text-decoration: none;}
a.breadcrumb:visited { font-family:Verdana; color: #ffffff; font-size: 0.68em; font-weight: bold; text-decoration: none;}
a.breadcrumb:hover { font-family:Verdana; color: #ffffff; font-size: 0.68em; font-weight: bold; text-decoration: underline; }
a.breadcrumb:active { font-family:Verdana; color: #ffffff; font-size: 0.68em; font-weight: bold; text-decoration: none;}
</style>
And then calling the "breadcrumb" class in your link
Jerry Kornbluth
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] Category Menu Active Link
By chassa2556 - March 28, 2009
Thanks for your replies I'm using the category menu dynamically and want the page that it lands on to be a different bold. Not sure if the active link is going to do that. Is there any php code I can use maybe an if statement?
Re: [chassa2556] Category Menu Active Link
By gkornbluth - March 28, 2009
Have you tried an "if" statement in the head that controls the stylesheet?
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] Category Menu Active Link
By chassa2556 - March 30, 2009