Border color on linked graphics / CSS ?

Border color on linked graphics / CSS ?

am 14.08.2007 06:56:28 von unknown

Post removed (X-No-Archive: yes)

Re: Border color on linked graphics / CSS ?

am 14.08.2007 07:50:58 von rf

"still me" wrote in message
news:g4d2c3h8jsi2dlu0p7er2f8de8pkgl2h4s@4ax.com...
>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}

You should not set all those things to the same colour.

> All the normal text links pick up the color.However, the border on
> linked images doesn't pick up the color.
>
> How can I specify a link color for linked images with borders via CSS

a:link img {color ...
..
..
..

--
Richard

Re: Border color on linked graphics / CSS ?

am 14.08.2007 08:02:49 von Neredbojias

Well bust mah britches and call me cheeky, on Tue, 14 Aug 2007 04:56:28 GMT
still me scribed:

> 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}
>
> All the normal text links pick up the color.However, the border on
> linked images doesn't pick up the color.
>
> How can I specify a link color for linked images with borders via CSS
> ?
>
> Thanks,

Specify a border for images such as:

img { border:4px solid; }

--
Neredbojias
Half lies are worth twice as much as whole lies.

Re: Border color on linked graphics / CSS ?

am 14.08.2007 09:15:01 von jkorpela

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
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/