Border color on linked graphics / CSS ?

Discussion in 'HTML' started by still me, Aug 14, 2007.

  1. still me

    still me Guest

    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,
    still me, Aug 14, 2007
    #1
    1. Advertising

  2. still me

    rf Guest

    "still me" <> wrote in message
    news:...
    >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
    rf, Aug 14, 2007
    #2
    1. Advertising

  3. still me

    Neredbojias Guest

    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.
    Neredbojias, Aug 14, 2007
    #3
  4. 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/
    Jukka K. Korpela, Aug 14, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    0
    Views:
    2,237
    tshad
    Jan 31, 2005
  2. =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=

    border-color: #003366; border-width: 2px;

    =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=, Jul 17, 2006, in forum: HTML
    Replies:
    64
    Views:
    3,480
    Adrienne Boswell
    Jul 30, 2006
  3. Bob Altman
    Replies:
    6
    Views:
    1,226
    Scott M.
    Aug 31, 2008
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    378
    Kamaljeet Saini
    Feb 13, 2009
  5. Replies:
    1
    Views:
    257
    marss
    Feb 14, 2007
Loading...

Share This Page