How to add a class to this?

I have this line in a script:

{ldelim}document.getElementById('show').innerHTML = '<b>This is maximum characters.</b>'; {rdelim}

and I have this line:

<span id='show' style="font-size:12px "></span>

I would like the text " This is maximum characters." to be red

How can I achieve this? add a class?

all help appreciated :slight_smile:

use span with style instead of <b>:

<span style="color:red;font-weight:bold">This is maximum characters.</span>

or move all styles into class
html:

<span class="maximum">This is maximum characters.</span>

css:

.maximum { color:red; font-weight:bold; }

Thank you megazoid :smile:

wow! yes I understand it now that I see what you have done,

Great appreciation for your help :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.