Scroll table cell content if user hovers with mouse

P

Pavils Jurjans

Hallo,

Here's the behaviour I'm trying to get:

I have a table with fixed column widths, and a single text line height
for every row. In rare cases, some cells might contain text that is
too long to fit within the cell box. To avoid text wrapping, I use
<nobr> tags to ensure that text stays in one line. Here's the testing
html:

<table style="table-layout:fixed" border="1">
<tr>
<td width="200" onmouseover="cellMouseOver(event, this)"><nobr>
So, here is some text that obviously will not fit in this lousy 200
pixel wide box. Let's try to scroll it, if user hovers his mouse for
some time over here.
</nobr></td>
</tr>
</table>

Now, what I am willing to do, is to program the cellMouseOver handler
so that if user holds mouse over the cell for, say, 1 second, and if
the text contents do not fit within the visible range of cell, it
starts scrolling until reaches the end, and then bounces back.

Well, all this timing handling etc. I can do easily, and the only
thing that puzzles me is how to get that inner text being hide under
the left side. I tried out scrollLeft prpoerty of table cell, negative
margin/padding values for cell style, some more attempts, but noluck.
I seem to be missing some elementary bit of knowledge to complish
this.

Please, if someone could suggest how to do this... I promise to post
the final code in the group, I think that's a valuable functionality.

Thanks,

-- Pavils
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top