making part of a background image clickable

L

laredotornado

Hi,

Let's say I have a background image for a table cell. It doesn't
repeat and is right-aligned.

..cellBG {
background: url('../images/mygf.gif') no-repeat;
background-position: right;
}

How would I trigger a particular event if a user clickx on the right-
most 50 pixels of the cell (and hence the image that's behind it)?

Thanks, - Dave
 
A

ASM

(e-mail address removed) a écrit :
Hi,

Let's say I have a background image for a table cell. It doesn't
repeat and is right-aligned.

.cellBG {
background: url('../images/mygf.gif') no-repeat;
background-position: right;
}

How would I trigger a particular event if a user clickx on the right-
most 50 pixels of the cell (and hence the image that's behind it)?

and what about to simply click the TD ?
(or have you something else to click in it ?)
 
L

laredotornado

(e-mail address removed) a écrit :





and what about to simply click the TD ?
(or have you something else to click in it ?)


To answer your question, yes, there is something else to click in it.
However, if I could catch the TD.onclick event and then determine
relative x,y coordinates of where the mouse click occurred, I could do
what I want.

- Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top