different coloured text in one line

  pcadv 18:49 11 Jan 2007
Locked

Hi,

I am trying to show three words, all in differnt colours but font is same. They should be in the same line.

Can anyone suggest me how to go about it?


thanks

  mco 19:45 11 Jan 2007

?

  pcadv 22:17 11 Jan 2007

Sorry. I had forgoten to add that. I am using css and html.

  LeadingMNMs 22:33 11 Jan 2007

Well simply speaking, but very ugly coding ....


<span class="classThatAppliesToAll">
<span id="red">
First
</span>
<span id="blue">
Second
</span>
<span id="yellow">
Third
</span>

With associated CSS for .classThatAppliesToAll (ie. font face, size etc) and #red, #blue, #yellow to assign colours. Obviously you could also put the style info within the style tags using, for example, style="color:red".

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5T review: Hands-on

Illustrator Andrés Lozano on his improv line work, brazen use of colours & hand sketching

iPhone X review

Comment envoyer gratuitement des gros fichiers ?