5 replies [Last post]
Anonymous
Anonymous's picture
Guru
calgary,alberta
calgary,alberta

I am trying to display text from a database using css and HTML.
I am satisfied with the layout and overall control given by css, i have great difficulty in doing the "simplest" things. I want to display text which changes color with no interruption to the layout of the line on which it appears - like the Delphi editor - highlighting certain types of text in different colors.
This can be achieved by embedding <FONT COLOR=???> within the text, and that works fine. But I want to broaden the functionality - i want to say <FONT CLASS="FONTCOLOR1">
But i cant get that to work - the class definitions seem ok - others work - but the color never changes.

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 4 weeks 2 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

font color

Although the font tag will be supported for a long time, it is depreciated in HTML 4.
You should look at using <span class="color1"> and define in your stylesheet: span.color1{color:#009900;}

Anonymous
Anonymous's picture
Guru

Thanks Tony

Thankyou Tony - thats a solution i am very happy with

Anonymous
Anonymous's picture
Guru

But i still cant get it to work Tony

I tried that but it still does not change the text color. Buggared if i know. Would somebody be prepared to look at the source for me?

Daniel
Daniel's picture
Offline
Enthusiast
Last seen: 30 weeks 2 days ago
Timezone: GMT+10
Joined: 2003-03-12
Posts: 76
Points: 0

Re: But i still cant get it to work Tony

ghijkl wrote:
I tried that but it still does not change the text color. Buggared if i know. Would somebody be prepared to look at the source for me?

Can you post a link to your page so we can have a look?

ghijkl
Offline
newbie
Melbourne
Last seen: 20 years 11 weeks ago
Melbourne
Timezone: GMT+10
Joined: 2003-03-23
Posts: 2
Points: 0

Question on Fonts

http://patlynch.homelinux.org/webpub/samples/SAMPLE.HTM is the url. I have fixed it now - at least the colour problem. Thanks for your help.
I was putting dots in the class name - font.color.1. Changed them to hyphens, and no problem now.