Roll over image.

vinnie881

Well-known member
Joined
Sep 3, 2006
Messages
152
Programming Experience
3-5
Why does the td not pull the width when i use a rollover image (It does without) Here is the code that does not work


VB.NET:
<td align ="left" valign ="middle" class="top_Email">
                                             <a href = "home.aspx" > <img class = "top_Email" src="images/top_Email.jpg"  onmouseover="this.src='images/top_Email_Hover.jpg'" onmouseout="this.src='images/top_Email.jpg'" alt="tlft" width="24" height="24" /></a></td>


here is the html that works with the rollover and the td size I want, but it tells me specifying the width is outdated. I am not concerned that this method is outdated, I'm just concerned why it doesn't work the other way?

VB.NET:
<td align ="left" valign ="middle" class="top_Email" width = "160">
                                             <a href = "home.aspx" > <img class = "top_Email" src="images/top_Email.jpg"  onmouseover="this.src='images/top_Email_Hover.jpg'" onmouseout="this.src='images/top_Email.jpg'" alt="tlft" width="24" height="24" /></a></td>

and here's the css
VB.NET:
.top_Email
{
	background-image: url(../images/topcrnr_bg.jpg);
	background-repeat: repeat-x;
	width: 160;
	border: 0;
}

Thanks
 
Back
Top