On 13/02/07, Ross Hulford <[EMAIL PROTECTED]> wrote:

> I have about 20 links in a side menu
> <a href="1.php">link one</a><br />
> <a href="2.php">link two </a><br />

You should probably be using lists for your lists instead of line breaks.

> They are links to 20 locations. The layout of the pages are identical the 
> only thing that changes is the address and map.
>
> The body id of all 20 pages is the same <body id="contacts"> but I need a 
> clever way to highlight the link when I am on that particular pages.

My preferred technique is a bit of logic in your CMS to output a "em"
element instead of an "a" element for the menu items representing the
current page.

> I do not want multiple body id's if possible and the links list is a common 
> file inserted via php (the locations often change and I only want to make one 
> central ammendment)

So you can represent each link as an associative array of a URL and a
label, and store them in an array. Then you can loop over that array
and compare the URL to that of the current page to make the decision
with.

-- 
David Dorward <http://dorward.me.uk><http://blog.dorward.me.uk>
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to