View Full Version : Changing of image border color

08-18-2005, 06:53 AM
<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>

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?

08-18-2005, 07:10 AM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
body {
a.img-border img, a.img-border:link img{
border:2px solid #008000;
a.img-border:visited img {
border:2spx solid #FFFF00;

<a href="#" class="img-border"><img src="yourimage.jpg" alt=""></a>

08-18-2005, 08:02 AM
Erase the "s" in this code :

border:2spx solid #FFFF00;