Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Border color on linked graphics / CSS ?

Reply
Thread Tools

Border color on linked graphics / CSS ?

 
 
still me
Guest
Posts: n/a
 
      08-14-2007
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,
 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      08-14-2007

"still me" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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


 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      08-14-2007
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.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      08-14-2007
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/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use one CSS style for both border and background color? Bob Altman ASP .Net 6 08-31-2008 06:10 AM
rounded corners in which my border color is different than the background color laredotornado@zipmail.com Javascript 1 02-14-2007 07:37 AM
border-color: #003366; border-width: 2px; =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= HTML 64 07-30-2006 04:01 PM
row bottom border in inner table not matching up with row border in outer table phl HTML 1 06-08-2006 03:43 PM
Datagrid Border showing when I say no border tshad ASP .Net 0 01-31-2005 05:40 PM



Advertisments