Forum Moderators: open

Message Too Old, No Replies

Firefox Displaying My Form Improperly

Firefox bad internet explorer good

         

SodiumSlayer

12:14 am on Apr 28, 2007 (gmt 0)

10+ Year Member



ok i've been working on this all day since about 12:00. I just got this form working properly in IE but when my friend tried to access the form from firefox the spacing was not anywhere near as tight and compact that i wanted it to be. here's the code maybe someone can help.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Page title</title>
</head>

<body>
<form action="gdform.php" method="post">
<input type="hidden" name="subject" value="Form Submission" />
<input type="hidden" name="redirect" value="thankyou.html" />
<div align="center" >
<div style="width: 692px; height: 502px">

<table>
<tr>
<td width="364" height="12" align="left">
<p align="right"><b>
<font size="2" face="Arial">First Name:</font></b></p></td>
<td width="399" height="12" align="left">
<font face="Arial">
&nbsp;
<input name="FirstName" size="40" style="color: #000000; font-family:Arial; font-size:10pt" /></font></td>
</tr>
<tr>
<td width="364" height="12" align="left">
<p align="right"><b>
<font size="2" face="Arial">Last Name:</font></b></p></td>
<td width="399" height="12" align="left">
<font face="Arial">
&nbsp;
<input name="LastName" size="40" style="font-family: Arial; font-size: 10pt" /></font></td>
</tr>
<tr>
<td width="364" height="12" align="left">
<p align="right"><b>
<font size="2" face="Arial">Company:</font></b></p></td>
<td width="399" height="12" align="left">
<font face="Arial">
&nbsp;
<input name="Company" size="40" style="font-size: 10pt; font-family: Arial" /></font></td>
</tr>
<tr>
<td width="364" height="12" align="left">
<p align="right"><b>
<font size="2" face="Arial">Telephone Number:</font></b></p></td>
<td width="399" height="12" align="left">
<font face="Arial">&nbsp;
<input name="PhoneNumber" size="20" style="font-size: 10pt; font-family: Arial" /></font></td>
</tr>
<tr>
<td width="364" height="12" align="left">
<p align="right"><b>
<font size="2" face="Arial">E-Mail:</font></b></p></td>
<td width="399" height="12" align="left">
<font face="Arial">
&nbsp;
<input name="Email" size="40" style="font-family: Arial; font-size: 10pt" /></font></td>
</tr>
<tr>
<td width="364" height="12" align="left">
<p align="right"><b>
<font size="2" face="Arial">Number of Flyers:</font></b></p></td>
<td width="399" height="12" align="left">
<font face="Arial">
&nbsp;
<input name="FlyerNumber" size="40" style="font-family: Arial; font-size: 10pt" /></font></td>
</tr>
<tr>
<td width="364" height="12" align="left" >
<p align="right"><b>
<font size="2" face="Arial">Target Area:</font></b></p></td>
<td width="399" height="12" align="left">
<font face="Arial">
&nbsp;
<input name="TargetArea" size="40" style="font-family: Arial; font-size: 10pt" /></font></td>
</tr>
<tr>
<td width="364" height="200" align="left">
<p align="right"><font face="Arial"><font size="2">
&nbsp;</font><b><font size="2">Comments:</font></b></font></p></td>
<td width="399" height="200" align="left">
&nbsp;
<textarea name="comments" cols="40" rows="11">
Type comments here.</textarea><p>
&nbsp;&nbsp;
<input type="submit" name="submit" value="submit"/></p>

</td>
</tr>
</table>
</div>
</div>
</form>
</body>
</html>

[edited by: BlobFisk at 1:08 pm (utc) on May 17, 2007]
[edit reason] Removed personal information [/edit]

stajer

12:43 am on Apr 28, 2007 (gmt 0)

10+ Year Member



try:

<table cellpadding="0" cellspacing="0">

SodiumSlayer

4:10 am on Apr 28, 2007 (gmt 0)

10+ Year Member



i added that code and it still looks exactly the same as before

stever

7:48 am on Apr 28, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



SodiumSlayer, welcome to WebmasterWorld.

One way to see why things are happening in different browsers that you don't expect is to check your page in a validator.

If you did that, you would find that you have errors with doctype and tags being closed improperly, as well as deprecated terms for what you have specified.

While correcting those won't necessarily correct what you want specifically, it will put you on the way to being able to write code which will work in all browsers.

Now take out all the inline styling and tags that you don't need in this case - in particular <font> and <p> inside table cells (<td>). (I would imagine without having checked that this is partly the cause of your problem.)

So you should be left with a table with text inside some cells and form tags inside others. You can now style those table cells or the form html and input boxes in the way you desire with either styles in the head of the page or in an external stylesheet.

The CSS forum [webmasterworld.com] here is a great resource.

Lastly, you will probably have an easier time online - whether it be with web design, marketing, SEO, or any of the other subjects here - if you assume that it is your level of knowledge that is insufficient rather than Firefox, Google or mod_rewrite being "broken" and doing things improperly. Sometimes, it is true, browsers do display things in a way which they should not, but more often than not it is a case of learning more about the way that html and css works.

Good luck!