Forum Discussion

JenniferSilbers's avatar
JenniferSilbers
Qrew Trainee
4 years ago

Color part of the background in a field

Hello,

I have a filed that I need to color part of the text and not another, example -   30%/30%

I have gotten close, however there is an invisible line break with the color formula I can't figure out.  Here is my formula:

var text targetl=Left([Target], "/");
var text targetr=Right([Target], "/");
var text targetlc="<div style=\"background-color:yellow;\">"& $targetl &"</div>";

$targetlc & "/" & $targetr

The formula leaves me with the below text and I am trying to get them to be on the same line. I have tried a few different variations but still I end of up with two separate lines. 
30%                 
/30%

Any help is appreciated.

Thank you

------------------------------
Jennifer Silberstein
------------------------------
  • Hi Jennifer,

    Try this out:

    <div style="background-color:yellow; display:inline;">

    Thanks!
    Gary

    ------------------------------
    Gary Blasco
    ------------------------------