Reply to Re: A: active link

Your name:

Reply:


Posted by Kevin Scholl on 06/23/06 01:37

Jim Moe wrote:

>> I have a global menu bar at the top of each page. I am looking for the
>> ability to change the color of the link in the global tool bar to a
>> different color if I am actual viewing that page.
>>
> Using a scripting language like PHP makes this type of work much easier.
> (It could be done with Javascript but not everyone has it enabled.)
> Create a function that outputs the menu code. The function's parameter
> list tells it which menu item to not be a link, instead giving it the
> style for "this page."

PHP is indeed one solution, but for those that may not have programming
knowledge or the server to support it... (see below)

>> EX: Global tool page included a link to the news page. It is colored black
>> like all the othe links listed in the global tool page. Once you have
>> navigated to the news page, the link for that page has now changed to red in
>> the global tool bar. I thought that was what A: active link is used for but
>> I think I am wrong.
>>
> The closest you can get with CSS is a:visited, but it is not unique. If
> you set it to red, all the other visited links are red as well.

It actually can be done quite easily with only CSS. There are several
tutorials for it online; here's a pretty straight forward one:

http://www.hicksdesign.co.uk/journal/highlighting-current-page-with-css

I've seen several sites that use this method, and have done several
myself with it, e.g., http://www.weathergrid.com/ .

--

*** Remove the DELETE from my address to reply ***

======================================================
Kevin Scholl http://www.ksscholl.com/
kscholl@comcast.DELETE.net
------------------------------------------------------
Information Architecture, Web Design and Development
------------------------------------------------------
We are the music makers, and we are the dreamers of
the dreams...
======================================================

[Back to original 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

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