PDA

View Full Version : DOM Compliant NN4 Browser Sniffer


jamescover
08-28-2002, 10:42 PM
Hi:

I think the subject sums it up: I need a "DOM Compliant NN4 Browser Sniffer." I only need it to sniff out that browser, but I'd like it DOM compliant.

There are two display issues that I can't resolve in that browser, so I'm going to have to produce a page just for it. The first issue is the size of a drawn frame, and the second is the size of an input text field. Neither of these are displayed at the same physical dimension in NN as in other browsers. For example, an input text field "size=24" in IE 5 takes up 179px on the horizontal, but it requires 200px in NN4. Unfortunately, I have a frame which is only 200 px wide, and this is adversely affecting the display of the page in that browser. Moreover, when I reduce the size of the input field, it doesn't line up as I'd like it to in IE.

Anyway, I know it's asking a lot, but does anyone have a ready-made DOM compliant, NN4 broswer sniffer script they'd be willing to share?


Thanks for any assistance.


James
He is risen!!!

brothercake
08-28-2002, 11:40 PM
try this http://www.brothercake.com/scripts/sniffer.shtml

re: your form fields issue - what you do is something like this

<input style="width:200px" size="20" ...

then nn4 will do the size, and the other browsers will use the pixel value. You just change the size until it's the same (or as close as you can get it ...)

You can also do a neat trick with buttons in nn4 - what you do is draw empty buttons all with the same amount of whitespace, eg:

<input type="button" value=" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ">

and ns4 will render the blank button of the width determined by the whitespace. Then, if you write a different value to the button, it stays the same size - the end results is you can get a row of identically sized buttons in ns4 :thumbsup:




... but was it worth it ...?

jamescover
08-29-2002, 01:53 AM
Hi Brothercake:


That worked great forthe input field. Thanks!!!

Is there any way of implementing css to determine the size of a frame within a frameset? I tried, but no luck. And I'm not up to speed on style sheets--just for basic links, fonts, and such.

I have a frameset as follows:

<frameset rows="201,263,*" border="0" frameborder="no" scrolling="no" framespacing="0">


In IE, the top frame row is 201 px, but in NN4, it is only 199px, which results in a small, single line border graphic beiing cut off in the frameset. If I increase the size of the frame to compensate in NN, it doesn't look right in IE. (I measure these with screen calipers, btw).

Can I use css to fix this too???

Thanks for you help. I appreciate it!


James
He is risen!!!

jamescover
08-31-2002, 04:11 AM
Hi:

Does anyone have an answer to the question in my second post, about determining the size a frame is drawn in NN4 verses IE????


Thanks,

James
He is risen!!!