Validation Again.

liunx

Guest
Ok. More validation problems but this time I hardly have any and they should be easy to figure out. The site: <!-- m --><a class="postlink" href="http://members.lycos.co.uk/syst3m1337/index.php">http://members.lycos.co.uk/syst3m1337/index.php</a><!-- m --><br />
<br />
The validator has a problem with the input elements in the login form. It says that the element isn't allowed where it is.<br />
<br />
<br />
...<br />
<form action="login.php" method="post"><br />
<input type="hidden" name="site" value="private/index.php" /><br />
Username:<input class="loginTxt" type="text" name="username" /><br />
<br /><br />
Password:<input class="loginTxt" type="password" name="password" /><br />
<br /><br />
<input class="loginButton" type="submit" value="Login" name="submit" /><br />
<p><br />
&nbsp;<br />
</p><br />
</form><br />
...<!--content-->Did not ge that error on both IE6+ and NS6+<br />
<br />
:-)<br />
<br />
Khalid<!--content-->i was getting an error about needing ins, div, etc first or something. i solved it by stick everything in the form in a div first (but not the form opening and closing tags). if this is your problem, it might next say something about the form tag, if that happens wrap it in a div too (so two useless divs, and i dont know why. validator gets what validator wants)<!--content-->I added a <fieldset> tag and everything is fine now. I will try the divs. Khalidali, what do you mean by you didn't get any errors? You mean not through the validator?<!--content-->The form elements should be within block level elements such as h#, p, div, table, td etc.<br />
<br />
<form...><br />
<input...><br />
...<br />
is NOT OK.<br />
<br />
Instead, use<br />
<form...><br />
<div><input...><br />
...<br />
</div><br />
</form><!--content-->
 
Back
Top