SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict jamesbond's Avatar
    Join Date
    Feb 2001
    Location
    The Netherlands
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    set bordercolor of image in link

    I have this link:

    <a href="edit.php?id=$id"><img src="images/edit.gif" border=1></a>

    And the link styles defined in a seperate stylesheet:

    a:link {color:#000000; font-size:11px; font-family:verdana, arial, geneva, helvetica; text-decoration: underline }
    a:visited {color:#000000; font-size:11px; font-family:verdana, arial, geneva, helvetica; text-decoration: underline }
    a:hover{color:#000000; font-size:11px; font-family:verdana, arial, geneva, helvetica; text-decoration: underline }
    a:active {color:#000000; font-size:11px; font-family:verdana, arial, geneva, helvetica; text-decoration: underline }


    But form some reason the bordercolors of the image are default blue & purple instead of black...

    How can i set the bordercolor of the image to black?
    Last edited by jamesbond; Sep 7, 2001 at 06:11.

  2. #2
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    try

    border-color:#ffffff;

    Sarah

    [oops #000000 ]

  3. #3
    SitePoint Addict jamesbond's Avatar
    Join Date
    Feb 2001
    Location
    The Netherlands
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did already try that as well and for some strange reason it doesn't work on images in IE6.

    In Netscape & Opera it does work though.


    What I have is :

    stylesheet :

    a:link {color:#000000; border-color:#000000; font-size:11px; font-family:verdana, arial, geneva, helvetica; text-decoration: underline }
    a:visited {color:#000000; border-color:#000000; font-size:11px; font-family:verdana, arial, geneva, helvetica; text-decoration: underline }
    a:hover{color:#000000; border-color:#000000; font-size:11px; font-family:verdana, arial, geneva, helvetica; text-decoration: underline }
    a:active {color:#000000; border-color:#000000; font-size:11px; font-family:verdana, arial, geneva, helvetica; text-decoration: underline }

    and in the document:

    <html>

    <head>
    <title>testing 123</title>

    <link rel="stylesheet" href="../style/stylesheet.css" type="text/css">

    </head>

    <body>

    <table>
    <tr>
    <td>
    <a href="edit.php"><img src="images/edit.gif" border=1></a>
    </td>
    </tr>
    </table>

    </body>
    </html>

  4. #4
    SitePoint Addict jamesbond's Avatar
    Join Date
    Feb 2001
    Location
    The Netherlands
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In IE6 it does work with regular html by replacing <BODY> with :
    <BODY LINK="#000000" VLINK="#000000" ALINK="#000000">

    If anyone would be willing to test if they can get a black border around an image(between <a>..</a> tags) in IE5.5 or IE6 by only using CSS I would really appreciate it.
    Last edited by jamesbond; Sep 7, 2001 at 07:37.

  5. #5
    SitePoint Member thirdkind's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey, US
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why not set the style for the img tag itself instead of trying to do it through the anchor?


    stylesheet:

    img.border { border : 1px solid black; }


    img tag:

    <img class="border" src="images/edit.gif">
    codebloat.com - Funnier than old people falling down stairs.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •