[thelist] PHP - good ways to indicate current page in navigation?

Jono jono at charlestonwebsolutions.com
Tue Jul 25 06:00:19 CDT 2006

> 1) Keep all the navigation in one HTML include that is a nested list
> 2) Include this list in each document and compare the current location
> (PHP_SELF) with the links in the include.
> 3) When there is a match, replace the link with a STRONG element and
> add a "parent" CSS class to each LI above the one that has a replaced
> link
> All wrapped up: http://www.onlinetools.org/tools/easynav/
> ...Even styling it is easy as you can style li strong{} as the current
> element.
> CSS is there to host the look and feel, don't use it to take over the
> job of HTML or JavaScript, it is just not reliable.

Not reliable when JavaScript is turned off - rare, but still a possible
setback; and possibly more common than CSS turned off?  It's a tough call -
rely on JavaScript, or CSS?

I've looked over the article you referenced before, looks promising.

Jono Young
Designer | Developer | Illustrator
Charleston Web Solutions
"Bringing Higher Standards to the Lowcountry"

More information about the thelist mailing list