|
Posted by Jim Moe on 08/24/07 19:34
Andy Dingley wrote:
>
>> I want to have the same background color
>> for the active tab and pages while the inactive pages will be a
>> contrasting color. How do I get the tabs to recognize which page is
>> active?
>
> Plain and simple CSS. No client-side scripting, no server-side
> scripting.
>
> Simple way: put class="current" on the current HTML element(s) and use
> simple CSS selectors to change what you need.
>
Two downsides:
1. The markup for the menu must exist on all of the pages making it
difficult to manage changes. This can be offset by using server-side
includes (ssi), not exactly scripting.
2. The tab for the current page has an active link even though it may have
a different color. However, since the tab menu exists on every page, I
guess it would be no big thing to remove the anchor when adding the class.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Navigation:
[Reply to this message]
|