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.
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;}
Thanks Tony
Thankyou Tony - thats a solution i am very happy with
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?
Re: 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?
Can you post a link to your page so we can have a look?
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.