2 replies [Last post]
pavement
Offline
newbie
Last seen: 15 years 27 weeks ago
Joined: 2004-06-04
Posts: 2
Points: 0

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

briski
briski's picture
Offline
Elder
London
Last seen: 7 years 26 weeks ago
London
Timezone: GMT+1
Joined: 2004-02-16
Posts: 1066
Points: 0

Classes being ignored by Netscape and Mozilla

Firstly you should not be using font tags Wink 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

pavement
Offline
newbie
Last seen: 15 years 27 weeks ago
Joined: 2004-06-04
Posts: 2
Points: 0

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!)