Changing the color of text in Mozilla Firefox

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
JackD
Forum Commoner
Posts: 62
Joined: Sat Dec 12, 2009 6:25 pm

Changing the color of text in Mozilla Firefox

Post by JackD »

[text]
echo "<br><br>List Price: <strike><font color=#ff0000 size='+2'><strong>\$$List_Price</strong></font></strike>";
[/text]
Works fine in IE, changing the $List_Price display text to red from black, makes it bold, increases the size, then puts the text back to regular black... does what we want.
In Firefox, it does everything but change the color of the text to red.

Apparently, Firefox requires css to do text color changes. IE will probably accept the same css. However, we cannot find any documentation that tells us how to make a css element that will allow us to change the color on the fly. Ideally, it would be an element that would also change the bold and size.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Changing the color of text in Mozilla Firefox

Post by Eran »

CSS, which became a standard at the end of 1996, removes (supposedly) the need to use HTML tags for visual formatting. HTML should be used for structural formatting (semantics). The <font> and <strike> tags have been long since deprecated. In short, use CSS and not HTML tags to change the formatting of your text. There are countless tutorials on the web, and a very detailed documentation (/specification) at the w3 site - http://www.w3.org/TR/CSS2/
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Changing the color of text in Mozilla Firefox

Post by pickle »

Dude, seriously? You don't know about CSS? You really need to update your skill set. Actually, everyone you included in "we", needs to update their skill set. Do what ~pytrin suggested & look up some tutorials.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply