OK, if some kind CSS guru could give me some input it would save me LOTS of time!
This was started in another forum but, after some experimentation, it has turned into a CSS issue.
***PROBLEM:
Using an external Style sheet linked to each page in the site causes INPUT and TEXTAREA ?s in a form to stretch way out of proportion in NN4x. Fine in IE5 of course.
***MY OBSERVATIONS:
The following style in the sheet is the problem as it is affecting the INPUT & TEXTAREA in NN4 but not in IE.
P,TABLE,TR,TD {
color: #000045;
font-family: verdana,arial,helvetica,sans-serif;
font-size: 15px;
}
I know this because I can change the font-size and it changes the INPUT/TEXTAREA fields in NN.
INPUT/TEXTAREA's would be more cross browser friendly if I didn?t use ?global? CSS on the page. NN4x vs IE5 rendering of a style is so different as to be useless.
Bugimus suggests using JavaScript browser detection, but don?t know if that would even solve the problem. Actually, if I could use detection and link to another CSS only for NN4x that would work I think.
"If NN4 then StyleNN, else Style1."
I understand this in theory, but not sure I could ever get it to work since JS doesn?t seem to like me! LOL
There is other text on the page that I would like CSS on, and I really don?t want to have to apply the style to individual tags if I don?t have to. I can do in tage styles for INPUT/TEXTAREA to control border and background color in IE since NN ignores them. (I know?I have that problem on another site.)
QUESTION:
What is my best option?
Is there a way to ?turn off? the STYLE SHEET for the form?
Is there a way to apply a different external style sheet to just the form? (I think I tried this on another page with no luck, maybe I don?t understand how you do it?)
How could I write a different STYLE SHEET and the page to keep the ?font-size? from affecting the INPUT/TEXTAREA in NN, then just link to it for that page?
I?m not sure what is the best, most economical solution here. Unfortunately, I feel I need to make this site NN4 compatible for the most part. The good thing is that I am learning a lot in the process!
Anyone interested in helping?I would be MOST GRATEFUL!
Bugimus wrote:
NN4, NN6, and IE all render form elements differently even if you specify the exact same size in your tags.
Specifying the CSS for the elements will help but you will never get them to be the same size with that method alone. If you need them to be really close you will have to detect the browser type with Javascript and then use document.write's to dynamically write in the appropriate size values in the input tags.
I think you will find that NN6 and IE are much closer to each other than NN4 is to either of them. I hope that helps and, yes, this is an extremely frustrating cross-browser issue.