Hi,
In my stylesheet I have the following (amongst other things):
.text12 { font-size: 12pt; font-family: Verdana, Helvetica, Arial, sans-serif };
.text11 { font-size: 11pt; font-family: Verdana, Helvetica, Arial, sans-serif };
.text10 { font-size: 10pt; font-family: Verdana, Helvetica, Arial, sans-serif };
.text9 { font-size: 9pt; font-family: Verdana, Helvetica, Arial, sans-serif };
.text8 { font-size: 8pt; font-family: Verdana, Helvetica, Arial, sans-serif };
.text7 { font-size: 7.5pt; font-family: Verdana, Helvetica, Arial, sans-serif };
.standard {font-size: 10 pt; font-family: Verdana, arial, helvetica, sans-serif};
.midd {font-size: 9 pt; font-family: Verdana, arial, helvetica, sans-serif};
.small {font-size: 8 pt; font-family: Verdana, arial, helvetica, sans-serif};
In my HTML I use <font class=text10>blah blah</font> or (in PHP code) echo "<font class='text7'>$desc</font><br>";
This works fine in IE, but in Netscape 6 and Firefox 0.8, these tags are completely ignored. Other styles are obeyed correctly in all browsers - it's just these ones that are being ignored.
This is driving me nuts - any ideas why are they being ignored? What is wrong with them?
Thanks
Classes being ignored by Netscape and Mozilla
Firstly you should not be using font tags but that's not the cause here. Use Divs or spans if you must wrap your text in extra tags.
Secondly you have semi-colons outside the style declarations
change
.text12 { font-size: 12pt; font-family: Verdana, Helvetica, Arial, sans-serif };
to
.text12 { font-size: 12pt; font-family: Verdana, Helvetica, Arial, sans-serif; }
and that should be a bit better.
On another note you should not have a space between the 9 and the pt for your font-size .standard .middle .small
Classes being ignored by Netscape and Mozilla
thanks! that did the trick....
hollow excuse I know - but the CSS is from a php script I downloaded - as are the font tags. (Though I probably would have done the same!)