Forum Moderators: open

Message Too Old, No Replies

Forcing browser font size on Netscape 4.x

Is it possible to adjust the users font size.

         

lgn

6:50 pm on Jul 3, 2003 (gmt 0)



Our website looks fine on IE and Netscape 6 & 7.

However the font size is one size to large on netscape 4.x, and our webdesign looks like crap.

I would not normally play with the users browsers settings, but this would be a public service for netscape 4.x users.

Does anyone have a favorite script, to detect and force the default font size for the netscape 4.x browser.

This is only affecting 1% of our traffic, but 1% adds up to a lot of sales over the course of the year.

And since I got everything to work for the other 99% of the browsers, I don't want to make any CSS changes.

MWpro

7:00 pm on Jul 3, 2003 (gmt 0)

10+ Year Member



If you're using css to control your fonts (if you're not you should) then you can look into using the @import trick to give netscape users a different stylesheet, in which you can put different font settings.

Dunno if you are good with CSS, but this is how it works:

You give all browsers a stylesheet, that is meant for netscape 4.x by using


<link rel="stylesheet" type="text/css" href="css-nn.css" />

(you can also do it in the <style> section but external style sheets are much better.)

Now in that stylesheet you put font stuff you want for netscape 4.x for instance
p {
font-size: 10px;
}

Then you use @import to overwrite these styles in modern browsers (since Netscape 4.x doesn't support @import, it will ignore it and stick to that style sheet up there)
<style type="text/css">
<!--
@import url(css-ie.css);
-->
</style>

And in the file that you @import in, you put the regular font stuff in there like
p {
font-size: 12px;
}

End result? Netscape 4.x will get a font size of 10px, and all modern browsers will get a font size of 12px. Of course this is only a basic example of what you can do with @import, and you will have to play around with the font size to get it looking good in netscape 4.x.

lgn

7:13 pm on Jul 3, 2003 (gmt 0)



Thanks

It looks like that will do the trick, and since
I have all my font settings in CSS, it will be
an easy fix.