Forum Moderators: open

Message Too Old, No Replies

Form sizes in Netscape

Space between input fields varies cross-browser

         

dmtt_67

7:32 pm on Jun 28, 2003 (gmt 0)

10+ Year Member



I am currently trying to wrap up a website and I am running into a few problems with different browsers. The site has a side bar which requires the contents of the site to be one exact size. I have been able to keep the size consistent for all of the pages except for the few pages with forms. In Netscape, the space between two input fields is smaller than in Explorer. I am using css styles for my whole site. Does anybody know how to fix this problem and keep a consistem size?

tedster

9:34 pm on Jun 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In Netscape, the space between two input fields is smaller than in Explorer.

Welcome to WebmasterWorld, dmtt_67.

Have you tried setting a specific margin and padding for the form element? I believe Netscape uses a different default for one of those two.

Also, you can sometimes get better cross-browser control by using display:inline for form elements.

dmtt_67

10:21 pm on Jun 28, 2003 (gmt 0)

10+ Year Member



Yes, I have tried both of those, but now I don't need a solution because I changed the side borders so that it doesnt matter what size the content is. Thankyou for your help.

griz_fan

3:19 pm on Jun 30, 2003 (gmt 0)

10+ Year Member



I'm not sure if this applies to your specific case or not, but I found it a helpful tip, so I thought I'd pass it along anyway....
Netscape 4.x has problems calculating the width of text input fields in forms when ever a font face is specified (either with the font tag or via CSS). From what I understand, the size of an Input or text area is measured in columns. When you specify a proportional font that affects an input or text area, NS 4.x winds up making these elements much wider than other browsers. But, if you specify a monospaced font such as Courier, your input and text areas should be the same width in the various browsers.

dmtt_67

6:35 pm on Jun 30, 2003 (gmt 0)

10+ Year Member



True, that doesnt help my problem, cuz i am dealing with vertical spacing, but that is a great tip to remember in the future. Also, I have done a few things to the site so that it no longer requires a static height inside the borders. Now I dont need to worry about beeing 2 pixels off anywhere. Thanx for your help.

tedster

7:10 pm on Jun 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like the most practical solution to me.

I avoid templates that require pixel-perfect rendering because it's nearly impossible to get it right cross browser. And if you do, you often need browser sniffing and conditional code that can be a bear to maintain. If you come back to it a year later, you can't even rememebr how it all works.

The best fix is not to design such a tight layout -- it's really a holdover from the print world anyway.