Reply to Re: Border color on linked graphics / CSS ?

Your name:

Reply:


Posted by Jukka K. Korpela on 08/14/07 07:15

Scripsit still me:

> I am setting the link colors using CSS in a style file, e.g.:
>
> a:link{color:#999999}
> a:visited{color:#999999}
> a:hover{color:#999999}
> a:active{color:#999999}

That's grossly wrong. Read a decent tutorial on web design to see why.
Briefly, links want to be links, and they want to look different after being
visited, and when hovered, and perhaps even when activated. They do all this
nicely on common browsers by default, so why do you attack this
functionality?

> All the normal text links pick up the color.

Sadly enough. And they may pick the same, or very similar, color as
background - you created this risk.

> How can I specify a link color for linked images with borders via CSS
> ?

You set a border for an image by setting border properties for an <img>
element.

For example,

:link img { color: #0000af; background: white; }
:visited img { color: #609; background: white; }
:link:hover img, :visited:hover img { color: #c33; background: white; }

On the other hand, if an image is relevant to the content, it should not be
messed up by making it a link. If it is just decoration, it surely shouldn't
be a link.

In special cases, it might make sense to make an image and its caption a
link, just because people may assume that they can click on the image, too.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

[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

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