Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The <PRE> tag

Status
Not open for further replies.

msteggo

Programmer
Oct 27, 2000
52
0
0
US
Is the <pre> tag cross-browser[version]?

I seem to have troubles with using it with Netscape 3.04, 4.08 and 4.74

Code:
<form>
<pre>Your name: <input type=&quot;text&quot; name=&quot;name&quot; size=&quot;20&quot;>
     School: <input type=&quot;text&quot; school=&quot;School&quot; size=&quot;20&quot;>
 District: <input type=&quot;text&quot; district=&quot;District&quot; size=&quot;20&quot;>
School address: <input type=&quot;text&quot; name=&quot;address&quot; size=&quot;20&quot;>
          City: <input type=&quot;text&quot; name=&quot;city&quot; size=&quot;20&quot;>
         State: <input type=&quot;text&quot; name=&quot;state&quot; size=&quot;20&quot;>
           Zip: <input type=&quot;text&quot; name=&quot;zip&quot; size=&quot;20&quot;>
    Class Load: <input type=&quot;text&quot; name=&quot;load&quot; size=&quot;20&quot;>
        e-mail: <input type=&quot;text&quot; name=&quot;email&quot; size=&quot;20&quot;>
Comments or Questions:
<textarea name=&quot;comments&quot; rows=&quot;5&quot; cols=&quot;50&quot; wrap=&quot;virtual&quot;></textarea>
<input type=&quot;submit&quot; value=&quot;Submit Inquiry&quot; name=&quot;submit&quot;> <input type=&quot;reset&quot; value=&quot;Clear Information&quot; name=&quot;B2&quot;>

</pre>
</form>


In those versions of Netscape, the labels, School to Comments, are ignored. Why?
 
That should work. I'm stumped. The pre tag works in Netscape 4x at least. I've actually seen that type of thing as an example of a trick that always works. -----------------------------------

Evil lurks in the net in the guise of protocols.

clarityclaire@optushome.com.au
 
I just copy and pasted your code and I have to say that in Netscape4.6 it works. I don't know what the problem is. -----------------------------------

Evil lurks in the net in the guise of protocols.

clarityclaire@optushome.com.au
 
msteggo,

I see some problems in these lines
School: <input type=&quot;text&quot; school=&quot;School&quot; size=&quot;20&quot;>
District: <input type=&quot;text&quot; district=&quot;District&quot; size=&quot;20&quot;>

should be
School: <input type=&quot;text&quot; name=&quot;School&quot; size=&quot;20&quot;>
District: <input type=&quot;text&quot; name=&quot;District&quot; size=&quot;20&quot;>

Maybe that's why you get stop at the School input field (not display on Netscape)

there may be some others problem, but i'm not sure, pls fix these two problems and see how it goes..

hope this helps

Chiu Chan
cchan@gefmus.com
 
Too true, Chiu, too true...
Thanks
 
I made the change, Chui, but there is no change in the result. Any other ideas?

Code:
<pre>
     Your name: <input type=&quot;text&quot; name=&quot;name&quot; size=&quot;20&quot;>
        School: <input type=&quot;text&quot; name=&quot;School&quot; size=&quot;20&quot;>
      District: <input type=&quot;text&quot; name=&quot;District&quot; size=&quot;20&quot;>
School address: <input type=&quot;text&quot; name=&quot;address&quot; size=&quot;20&quot;>
          City: <input type=&quot;text&quot; name=&quot;city&quot; size=&quot;20&quot;>
         State: <input type=&quot;text&quot; name=&quot;state&quot; size=&quot;20&quot;>
           Zip: <input type=&quot;text&quot; name=&quot;zip&quot; size=&quot;20&quot;>
    Class Load: <input type=&quot;text&quot; name=&quot;load&quot; size=&quot;20&quot;>
        e-mail: <input type=&quot;text&quot; name=&quot;email&quot; size=&quot;20&quot;>
Questions or comments:
<textarea name=&quot;comments&quot; rows=&quot;5&quot; cols=&quot;50&quot; wrap=&quot;virtual&quot;></textarea>
<input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;submit&quot;> <input type=&quot;reset&quot; value=&quot;Clear&quot; name=&quot;B2&quot;>

</pre>

The result of this code is at:

P.S. Is it possible that you can't nest the pre in a form that is nested in a <td> of a table? That's where this code is...

Thanks for all your help
Mike
 
hi Mike,

Yes it mays work better if you use Table, try the following code that i converted form <pre> to <table>

<form>
<center>
<table cellspacing=0 cellpadding=3 border=0>
<tr><td align=right>Your name:</td>
<td align=left><input type=&quot;text&quot; name=&quot;name&quot; size=&quot;20&quot;>
</tr>
<tr><td align=right>School:</td>
<td align=left><input type=&quot;text&quot; name=&quot;School&quot; size=&quot;20&quot;>
</tr>
<tr><td align=right>District:</td>
<td align=left><input type=&quot;text&quot; name=&quot;District&quot; size=&quot;20&quot;>
</tr>
<tr><td align=right>School address:</td>
<td align=left><input type=&quot;text&quot; name=&quot;address&quot; size=&quot;20&quot;>
</tr>
<tr><td align=right>City:</td>
<td align=left><input type=&quot;text&quot; name=&quot;District&quot; size=&quot;20&quot;>
</tr>
<tr><td align=right>State:</td>
<td align=left><input type=&quot;text&quot; name=&quot;state&quot; size=&quot;20&quot;>
</tr>
<tr><td align=right>Zip:</td>
<td align=left><input type=&quot;text&quot; name=&quot;zip&quot; size=&quot;20&quot;>
</tr>
<tr><td align=right>Class Load:</td>
<td align=left><input type=&quot;text&quot; name=&quot;load&quot; size=&quot;20&quot;>
</tr>
<tr><td align=right>e-mail:</td>
<td align=left><input type=&quot;text&quot; name=&quot;email&quot; size=&quot;20&quot;>
</tr>
</table>
<br>Questions or comments:
<br><textarea name=&quot;comments&quot; rows=&quot;5&quot; cols=&quot;50&quot; wrap=&quot;virtual&quot;></textarea>
<br><input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;submit&quot;> <input type=&quot;reset&quot; value=&quot;Clear&quot; name=&quot;B2&quot;>
</center>
</form>

hope this helps

Chiu Chan
cchan@gefmus.com
 
What about cell borders in Netscape? I am trying to avoid them in this case, since I can't seem to make them blend in with the rest of the background...that is the only reason that I use <pre>...otherwise i would have used tables. I am much more familiar with tables than with <pre> tags.

Is there a way to rid the borders in netscape?
 
Here's how to do it.

&#60;table cellspacing=&quot;0&quot; border=&quot;0&quot;&#62;

that works always -----------------------------------

Evil lurks in the net in the guise of protocols.

clarityclaire@optushome.com.au
 
Clarity, I'm sorry, but I do that and Netscape still seems to put some border between the cells...for example, if you could, take a look at:


BTW, sorry, but I seem to be as clean with my html as I am with my apartment, and that's not great...

Mike
 
Mike,

> Clarity, I'm sorry, but I do that and Netscape still seems to put
>some border between the cells...for example, if you could, take a look at:
>
Wow, I don't quite know what to say... The URL you posted does NOT have the table setup the way Clarity described.It's HTML code has border attributes EVERYWHERE. I'm just guessing here... but maybe that's why NS shows cell borders?

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top