Forum Moderators: open
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<link href="themes/swamp/style.css" rel="stylesheet" type="text/css"><table width="242" border="0" cellpadding="0" cellspacing="0">
<tr><td><img src="themes/swamp/images/lnav-topHL.png" width="242" alt="Login"></td></tr>
<tr><td background="themes/swamp/images/lnav-top2.png" height="120"><form method="POST" action="">
<table width="242" height="120">
<tr><td width="86" height="2" align="right"><p><b><br><span class="memberbar">User:</span></b></p></td>
<td width="162"><p><br><input type="text" name="username" size="11" maxlength="15"></td></tr>
<tr><td height="5" align="right"><p><b><span class="memberbar">Pass:</span></b></p></td>
<td><input type="password" name="password" size="11" maxlength="15"></td></tr>
<tr><td height="60"></td><td><input type="submit" name="login" value="Login"></td></tr>
</table></form>
</table>
but once i remove
"http://www.w3.org/TR/html4/loose.dtd" 2. The code you pasted in has no <head></head> section, and it also refers to a .css file that may be part of the picture.
I'd suggest first using the validators at the W3C. It's extremely important to be working with valid code when trying to fix rendering problems. Without that, you can just spin your wheels, since ever browser has different error recovery routines.
W3C Validator - HTML [validator.w3.org]
W3C Validator - CSS [jigsaw.w3.org]
It was caused because this DTD allows you to leave certain tags unclosed, like the <p> and <li>. browsers 'assume' that the last one is closed when a new one starts. I accidentally left the closing bracket off an <hr> and every browser but IE treated the page as if <hr> was properly closed.
(Note: I have had other problems in which it was firefox that was the oddball, too.:-)
I solved mine by pouring over my own code till I spotted an error. I'm not practiced with tables however.
But here is a troubleshooting suggetion i just came up with (based on the above experience) that might help.
Change your doctype to html 4.01 strict. Then use the w3c validator. All unclosed tags and other errors that are allowed in the "loose" doctype will be flagged. Correct them all. See what happens. You may then be able to revert to the "loose" doctype if you need to.
The idea here is that, because the transitional "loose" doctype uses browser interpretation to fill in left out code, there is room for differences. (the treatment of the <hr> tag and it's missing bracket, a case in point.). If you have accidentally left an error in your code that is being adjusted to by most of the browsers (except in this case firefox), it will be revealed.
I'm pretty green at this, so I'll be really curious to know if this actually helps you figure out the problem.
[edited by: commanderW at 4:06 am (utc) on Dec. 25, 2008]
<p><b><span class="memberbar">Pass:</span></b></p> No need for the bold tags. You can add the bold styling to your stylesheet.
No need for the span tags, you can add the style name to the paragraph tags -- in fact, if there are multiple cells needing that style name, you might be able to add it (just once) to the table row or table tag and use this notation to style it:
table.memberbar tr td p { ....; } There's also no need for <br> tags, you should use CSS to style the top or bottom margin of the paragraph.