There is a line of text inside a <div></div> or inside <p></p>.
The text length changes when clicking some links.
If the text length decreases the div or p will decrease.
If the text length increases the div or p will increase.
How can i do this ?
The problem is the div or p width looks fixed and the length of text is 30% of that div or p.
The div or p has a background color. So whole div or p is colored. But what i’m trying to do is to color the portion of background of div or p, the portion that contains text of line.
Ah, you’re doing Rails! Ok, here’s your real answer. Just check to see if the
flash[:notice]exists before displaying it to the screen.