in reply to Get info from browser known only to JavaScript?

stepping into HTML Purist Monk Mode
Please Please Please consider any and all alternatives before you start playing around with this... People have set their browser size and fonts to match what they prefer; for some, this might mean they are at 1024x768, with 6 pt fonts and 100 lines on the screen, for others, this is 640x480 with 24pt fonts and only 10 lines on the screen. This is usually done for readability purposes on their part. What you are suggesting that you'd be doing is forcing the font size to be a certain size so that you can specify exactly how many lines should be visible. This will annoy the former user above, and will be impossible to read by the latter one. It is usually a bad thing to play with the BODY font properties anyway since this is 99% of the test on a web site, and that is what a person will have set their fonts to read by.

In addition, the FONT tag is depriciated. Since you are using CSS, you should be setting styles and using SPAN and DIV to set the font styles for given areas. And it is best to stick to the relative font sizes in CSS (big, bigger, small, smaller) than to even use percentages much less pixel sizes.

HTML purist rant off


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
  • Comment on Re: Get info from browser known only to JavaScript?

Replies are listed 'Best First'.
Re: Re: Get info from browser known only to JavaScript?
by aplonis (Pilgrim) on Mar 14, 2001 at 07:40 UTC
    Thank you for your kind reply.

    Actually I had this working for MSIE5 and NC4.7, in CSS and JavaScript, but now with NC6, it crashes badly. I was looking to PERL CGI as a way to escape from the multitudinous JS/Browser versions. You may visit my site at om-ah-hum.com to see what I had done with it.

    I was setting the lines per screen in pixels, so that everybody got the same not different aspect in their window. It worked pretty well for 600, 800 and 1024 size displays. The only big hitch was my jpeg background which tiled horizontally at 1280...until I widened it.

    I had set all the frames to percent of the screen, and the fontsizes to percent of the screen. You could shrink or expand the window and it looked okay. I was really quite happy with it until NC6. I did that with all three of my sites.

    Thank you,
    Gan Starling
    Kalamazoo MI