Reply to Re: CSS issue

Your name:

Reply:


Posted by Steve Pugh on 11/18/05 17:40

ricrusso wrote:
> I cannot understand why I don't get the same result every time on
> something simple.
> I use a css page for formatting on my own site, www.ricrusso.com.
> My links should be green (which they are).
> However, they should also be under and overlined when hovering.
> Only some links do it. I don't know why.

The one's that don't are the ones that you've already visited.

> Here is an example:
> http://www.ricrusso.com/sub/pc/pctips.htm
>
> Most links have the under/over line but if you hover down the link
> list, you will find some that don't comply. I have not added any
> overriding code to cause this.

>From your stylesheet (just the relevant rules):

a:link { text-decoration: none; }
a:hover { text-decoration: underline overline; }
a:visited { text-decoration: none;}

When you hover over an unvisited link both the :link and :hover rules
apply. As they have equal specificity the last specified, in this case
:hover, is applied.

When you hover over an visited link both the :visited and :hover rules
apply. As they have equal specificity the last specified, in this case
:visited, is applied.

Place the :hover rule after the :visited rule in your stylesheet.

Steve

[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

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