Web Hosting Talk







View Full Version : table and form problem


punaboy
09-05-2002, 06:54 PM
I need a single line, table and form.

This will keep the table to a single line (viewed) but it is produces all kinds of HTML validation errors. (functions fine with IE and NS)


<table border="1">
<tr>
<td>
<table border="1">
<tr>
<form action="myphphere" method="post">
<input type="hidden" name="mynamehere" value="myvalue" />
<input type="hidden" name="cpv" value="1" />
<td>
Search:
</td>
<td>
<input type="text" size="18" name="keyword" />
</td>
<td>
<input type="submit" value="go">
</td>
</form>
</tr>
</table>
</td>
<td>
one line of info here
</td>
</tr>
</table>


This is the correct HTML, but it keeps dropping the table down.


<table border="1">
<tr>
<td>
<form action="myphphere" method="post">
<input type="hidden" name="mynamehere" value="myvalue" />
<input type="hidden" name="cpv" value="1" />
<table border="1">
<tr>
<td>
Search:
</td>
<td>
<input type="text" size="18" name="keyword" />
</td>
<td>
<input type="submit" value="go">
</td>
</tr>
</table>
</form>
</td>
<td>
one line of info here
</td>
</tr>
</table>


How can I correct it so it stays a single line without dropping or do I just not worry about the validation errors as long as it works in the different browsers.

Any justification or comments would be appreciated.
Thanks.

conceptual
09-05-2002, 07:31 PM
Try this:;)

<form action="myphphere" method="post">
<table width="75%" border="1" cellspacing="0">
<tr>
<td width="61%">
<input type="hidden" name="mynamehere" value="myvalue" />
<input type="hidden" name="cpv" value="1" />
<table width="100%" border="1" cellspacing="0">
<tr>
<td width="17%"> Search: </td>
<td width="60%">
<input type="text" size="18" name="keyword" />
<input type="submit" value="go" name="submit">
</td>
</tr>
</table>
</td>
<td width="39%">One line of info here</td>
</tr>
</table>
</form>
</body>
</html>

:D

punaboy
09-05-2002, 08:16 PM
Thanks ultra, that solved the error problem, but I figured out that I have a third table (main) and with that It still drops once I install the final </form> tag. I'll just have to eliminate one table and it works fine, single line and no validation errors. Thanks again.