3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by prachipote
0

u have to change the innerhtml of td tag.
so the onmousover event will look something like this:

onmouseover = "document.getElementById('tdId').innerhtml='<img src='imgname.jpg'>' "
0

how to give rollover image to a particular td?
i want that rollover image to full td i was tried but it takes only that txt?

You can create a CSS class & set ur BG Image in that class. And then just integrate that class in your TD.
Then the desired output can be achieved.

Eg.
---CSS Class--

.SampleClass{
background:url(defaultimageName.png);
}
.SampleClass:hover{
background:url(rolloverimageName.png);
}

---CSS Class--

<td class="SampleClass">Sample</td>

--
Hope this works for you...!

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

0

i had already tried this.but it takes that img only for text whichever
written.i want that image rollover for hole that td

0

I would preferably emphasize to use ':hover' attribute for a CSS class you are using (in this rollover image is to be used), I am quite confident that the desired result would be obtained.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.