Too long text inside HTML element with dynamic background color

My question expands on this question:

Too long text inside HTML element

I can fade out text strings (in a table cell in my case) using PNG fading from transparent to background color.

For my application, however, I need a background color that is dynamic and scriptable. On hover, the background color of the table row row changes, and of course this makes the PNG "fader" image visible and ugly.

How can I achieve dynamic / scene-changeable / changeable background color and , I have long text, truncated with fading?

+3


source to share


2 answers


As I said in my comments, you can do this with a pseudo selector and some css3 gradients. Of course, this will only work on some browsers.



http://jsfiddle.net/x4gSG/1/

+7


source


Can't tell for sure without seeing it, but it looks like you should change the hover color.



i.e. a: hover {background-color :?}

0


source







All Articles