biggy
01-12-2006, 06:21 PM
I can't seem to nail this down. What I need to do is rollover an image in one td and change the style of the text in another td. What I have are text links on a page that when rolled over the style sheet says to underline them. That part is ok. What I need to do is when a user rolls over the image in the td next to the text link, the rollover style is applied to the text link and becomes underlined. This is what I have tried. Maybe it's a syntax issue. Thanks.
<html>
<head>
<title>Untitled Document</title>
<style type="text/css">
<!--
.rolloverStyle {font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; line-height: 14px; color: #2a57a5; text-decoration: none;}
.rolloverStyle:hover {font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; line-height: 14px; color: #2a57a5; text-decoration: underline;}
-->
</style>
</head>
<body>
<table>
<tr>
<td><A href="theurl.html" onMouseOver="document.testLink.style='rolloverStyle:hover'" onMouseOut="document.all.testLink.style='rolloverStyle'"><IMG src="imagename.gif" border="1" name="testIcon"></A></td>
<td><div id="testLink"><A href="theurl.html" class="rolloverStyle">This is the text link.</A></div></td>
</tr>
</table>
</body>
</html>
<html>
<head>
<title>Untitled Document</title>
<style type="text/css">
<!--
.rolloverStyle {font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; line-height: 14px; color: #2a57a5; text-decoration: none;}
.rolloverStyle:hover {font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; line-height: 14px; color: #2a57a5; text-decoration: underline;}
-->
</style>
</head>
<body>
<table>
<tr>
<td><A href="theurl.html" onMouseOver="document.testLink.style='rolloverStyle:hover'" onMouseOut="document.all.testLink.style='rolloverStyle'"><IMG src="imagename.gif" border="1" name="testIcon"></A></td>
<td><div id="testLink"><A href="theurl.html" class="rolloverStyle">This is the text link.</A></div></td>
</tr>
</table>
</body>
</html>