![]() |
making part of a background image clickable
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 |
Re: making part of a background image clickable
laredotornado@zipmail.com 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 ?) -- Stephane Moriaux et son (moins) vieux Mac déjà dépassé Stephane Moriaux and his (less) old Mac already out of date |
Re: making part of a background image clickable
On May 9, 2:00 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote: > laredotorn...@zipmail.com 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 ?) > > -- > Stephane Moriaux et son (moins) vieux Mac déjà dépassé > Stephane Moriaux and his (less) old Mac already out of date 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 |
| All times are GMT. The time now is 06:27 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.