Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing of image border color

    Code:
    <a href=test.htm>
    <img src=http://us.i1.yimg.com/us.yimg.com/i/mntl/hlth/05q1/img_yogurt.jpg width=124 height=133>
    </a>
    If I open the web page which has the above code for the first time,
    The border of the image link is blue.

    After I once click the link, the border of the image link becomes purple.


    I like to change the first color of the image border which is not clicked,
    into "green," and the second color of the image border which is clicked, into "yellow."

    Can I do it by your help?
    Get my greedy up

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Untitled Document</title>
    <style type="text/css">
    body {
    text-align:center;
    }
    a.img-border img, a.img-border:link img{
    border:2px solid #008000;
    }
    a.img-border:visited img {
    border:2spx solid #FFFF00;
    }
    </style>
    </head>
    
    <body>
    <a href="#" class="img-border"><img src="yourimage.jpg" alt=""></a>
    </body>
    </html>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Mar 2004
    Location
    CAMBODIA
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Erase the "s" in this code :
    Code:
    border:2spx solid #FFFF00;
    -= Dweed-Ly =-


  •  

    Posting Permissions

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