You are here: Re: Working with tabbed menus « HTML « IT news, forums, messages
Re: Working with tabbed menus

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация