Forum Moderators: open

Message Too Old, No Replies

Form Netscape Problem

         

deltron23

10:17 pm on Mar 27, 2003 (gmt 0)

10+ Year Member



I have a mail list form. In Netscape 4.7 the form is more wide than in Explorer. Does anyone have a suggestion on how to make my form consistant in both browsers.

<input name=address value=your_e-mail... size="15" maxlength="50" style="WIDTH:120px; BACKGROUND-COLOR: #d7ebff; BORDER-BOTTOM: #e1e1e1 1px solid; BORDER-LEFT: #cccccc 1px solid; BORDER-RIGHT: #e1e1e1 1px solid; BORDER-TOP: #cccccc 1px solid; COLOR: #000040; FONT-FAMILY: verdana,arial; FONT-SIZE: 11px">

DrDoc

10:35 pm on Mar 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is not possible.

Netscape 4 doesn't understand CSS width on form elements...

deltron23

10:37 pm on Mar 27, 2003 (gmt 0)

10+ Year Member



So, how can I make my form field the same width on both netscape 4.7 and explorer browsers?

DrDoc

10:51 pm on Mar 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, you will come close if you play with the size attribute along with a font size in pixels. But to make them exactly the same width... don't think you can. Well, unless you go back to old nasty non-standard HTML and font tags and such...

scottmack

1:10 am on Apr 12, 2003 (gmt 0)

10+ Year Member



Use a monospace font like Courier and the width will be the same

joshie76

8:46 am on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're asking what I think you're asking ... there is a neat trick for this that I discovered sometime back:

Since the style attribute is (mostly) ignored in Netscape, but overrides size in browsers that more fully support CSS we can use the size to set the size for NN, and style to set the size for IE:

<input type="text" size="25" style="width:200px" />

You have to fiddle around to get them to look the same but it shouldn't take long. Works a treat too!

Josh

tedster

9:03 am on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks, for that tip joshie. I have a bunch of pages out there that would have benefitted had I known about it earlier. I ended up browser sniffing and writing separate pages.

[edited by: tedster at 9:45 am (utc) on April 12, 2003]

joshie76

9:08 am on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No need, you've already thanked me: [webmasterworld.com...]

:)

(Wow, just realised that was two years ago almost to the day!)

tedster

9:47 am on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And so you did - and now I remember it well, but my memory must be slipping because you had to jog it. Time for bed.