Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

need background color for dynamic text

$
0
0

Hi,

 

I am have ajax loaded dynamic text. I've kept overflow for text box "visible".

width: 200px, height: 30px. Since overflow is visible, the text automatically expands (vertically).

The problem comes when i want to use background color for the text. I used this:

sym.$("textbox").css("background-color", "red");

 

 

But this sets the color only for 30 px. and there will be extra text hanging without a background color. Increasing the height of the box to a fixed number is not a option - if the text is small there will empty colored space in the box.

Is there a way to dynamically set the background color to the length of text?

Any help will be much appreciated.

Thanks in Advance.

Capture2.PNG


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>