[thelist] NavBar, highlighting current link
Tom Dell'Aringa
pixelmech at yahoo.com
Fri Feb 21 11:02:01 CST 2003
--- Kevin Cannon <p+evolt at redbrick.dcu.ie> wrote:
> Hey,
>
> I have a typical navbar
> home contact about moo
>
> I just want to highlight the current page,
> and in the absencs of an a:current pseudo element in CSS i'm
> wondering wht my options are.
There are lots of solutions, here is one that may not be the total
best but works for me, especially if I want to do it fast.
Since you are using PHP, on each page set a page name variable like:
$pageName
Which can be whatever you want. Then in your nav, if you are on the
named page, switch the graphic or link to selected:
$pageName = "foo";
if($pageName == "foo")
print out selected graphic OR 'highighted' link
else
print out other version.
now depening on the scope of your site and other things, this may or
may not be what you want. Anyway it works, I use it at:
www.sparklesparties.com to set the tabs.
HTH
Tom
=====
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
http://www.pixelmech.com/
var me = tom.pixelmech.webDeveloper();
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
More information about the thelist
mailing list