PDA

View Full Version : change few links one onmouseover



d-machine
07-02-2008, 09:29 AM
Hi I have a small complicated question


<ul>
<li>
<a href="#" class="toggle"><img src="http://images.apple.com/support/home/en/images/video_poster_20071212.jpg" alt="" /></a></li>
</ul>

What I need to do is to have a border on the list and on the image, that which will be changed on mouseover on the list

how can I do it?

Thanks

jscheuer1
07-02-2008, 10:05 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.toggle {
border:2px solid blue;
}
.toggle img {
border:2px solid green;
}
.toggle2 {
border:2px solid red;
}
.toggle2 img {
border:2px solid orange;
}
</style>
</head>
<body>
<ul class="toggle" onmouseover="this.className='toggle2';" onmouseout="this.className='toggle';">
<li>
<img src="http://images.apple.com/support/home/en/images/video_poster_20071212.jpg" alt=""></li>
</ul>
</body>
</html>

d-machine
07-02-2008, 10:40 AM
THANK YOU ! THANK YOU! THANK YOU !!

I could never think to do it that way !!