Skip to main content

Adding ,

 newDiv1Text += "<span class='highlightRed'>" + div1TextSplitted[wordNumber1] + "</span> ";

span class is not applying the css class to the text.

 

but ,

  newDiv1Text += "<span style = 'background-color :red'>" + div1TextSplitted[wordNumber1] + "</span> ";

is working .

 

I need the css to be applied to the text by not hardcoding. Please share your inputs 

 

#Salesforce Developer

1 answer
0/9000