Forum Moderators: open

Message Too Old, No Replies

Pixel font sizes and Netscape

Very inconsistent results compared to I.E

         

markd

4:46 pm on Oct 26, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi everyone

I am trying to set a CSS font size using Dreamweaver of 11 pixels.

This is working like a dream in IE from v5, with the font displaying at the desired 11 pixels, but is proving a nightmare in any Netscape browser from 4.7 upwards.

The type is displaying more like a standard size 2 HTML typesize and is not maintaining the specified font.

I wondered if anyone had some tips for making pixel font sizes work in Netscape.

Thanks

Markd

tedster

5:25 pm on Oct 26, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I sometimes handle browser differences by writing one css file for Netscape 4.x and then bringing a second CSS file into the cascade with @import -- the second file overwrites style declarations to account for any IE differences.

Since Netscape 4.x doesn't support @import directives, this technique acts as an automatic browser sniffer to deliver the right styles to the right browsers.

There's some earlier threads around here about the more general challenges of using pixel sizing (there are challenges with point sizing, too). Here's one of the good threads, which also might be useful to you:

[webmasterworld.com...]

markd

9:37 am on Oct 27, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks for the link Tedster, it made interesting reading.

My problem is occuring when I change the visibility of a layer which contains the '11 pixel sized' text.

I am using Dreamweaver behaviours to hide a layer until someone rolls over a logo which will then show the layer. On 'mouse out' the layer will again become hidden.

It is the text which is contained within the 'show/hide' layer which is displaying perfectly in IE but looks like an HTML size 2 in Netscape 4.7+.

There must be something I am doing wrong with the layer attributes, as I have tried the same pixel sized type in a single layer in a new page and is displays within acceptable tolerances in both IE and Netscape.

I'm off for an asprin and a rest in a darkened room!!!!

knighty

11:36 am on Oct 29, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



markd,

First off is the layer nested? if so you will need to make the nested layer appear in a style sheet or it will not work!

secondly set the div tag to 11px in your style sheet or use antother div tag to set font size.

I have used pix fonts in layers on numerous occaisions and always have successful results cross browser :)

markd

2:25 pm on Oct 29, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for the advice Knighty.

Yes, the layer is nested and the text within the layer is in a style sheet.

What seems to be happening is that Netscape is loading the browsers 'default' settings for font sizes/styles, so that when I am 'showing' the layer (by putting a 'mouseover' on a logo) it is loading as Arial 12pt rather than the 11px I have specified in the style sheet.

I read somewhere that Netscape can read/load layers but cannot change the properties of a layer once loaded. I wonder if this means that it classes the 'show layer' behaviour as a 'change of layer property'?

I am achieving the show/hide layer through a Dreamweaver behaviour (as my knowledge of programming is very limited!) and all is working perfectly in IE.

I love Netscape! Any further thoughts much appreciated.

Markd